Files
freeCodeCamp/curriculum/challenges/italian/01-responsive-web-design/css-flexbox/add-flex-superpowers-to-the-tweet-embed.md
camperbot b3af21d50f chore(i18n,curriculum): update translations (#42487)
* chore(i18n,curriculum): update translations

* chore: Italian to italian

Co-authored-by: Nicholas Carrigan <nhcarrigan@gmail.com>
2021-06-14 11:34:20 -07:00

5.6 KiB

id, title, challengeType, videoUrl, forumTopicId, dashedName
id title challengeType videoUrl forumTopicId dashedName
587d78ab367417b2b2512af1 Aggiungere i superpoteri Flex al Tweet Incorporato 0 https://scrimba.com/p/pVaDAv/c9W7MhM 301100 add-flex-superpowers-to-the-tweet-embed

--description--

A destra puoi vedere il tweet è incorporato che sarà utilizzato come esempio pratico. Alcuni degli elementi apparirebbero meglio con un layout diverso. L'ultima sfida ha mostrato il funzionamento di display: flex. Qui lo aggiungerai a diversi componenti nel tweet incorporato per iniziare a regolare il loro posizionamento.

--instructions--

Aggiungi la proprietà CSS display: flex a tutti i seguenti elementi - nota che i selettori sono già impostati nel CSS:

header, il .profile-name dell'header, il .follow-btn dell'header, l'h3 e h4 dell'header, il footer e le .stats del footer.

--hints--

Il tuo .follow-btn dovrebbe apparire sulla pagina. Assicurati di disattivare tutte le estensioni come ad esempio gli adblock.

assert($('.follow-btn').length > 0 && $('.follow-btn').css('display') !== 'none');

Il tuo header dovrebbe avere una proprietà display impostata su flex.

assert($('header').css('display') == 'flex');

Il tuofooter dovrebbe avere una proprietà display impostata su flex.

assert($('footer').css('display') == 'flex');

Il tuoh3 dovrebbe avere una proprietà display impostata su flex.

assert($('h3').css('display') == 'flex');

Il tuoh4 dovrebbe avere una proprietà display impostata su flex.

assert($('h4').css('display') == 'flex');

Il tuo .profile-name dovrebbe avere una proprietà display impostata su flex.

assert($('.profile-name').css('display') == 'flex');

Il tuo .follow-btn dovrebbe avere una proprietà display impostata su flex.

assert($('.follow-btn').css('display') == 'flex');

Il tuo .stats dovrebbe avere una proprietà display impostata su flex.

assert($('.stats').css('display') == 'flex');

--seed--

--seed-contents--

<style>
  body {
    font-family: Arial, sans-serif;
  }
  header {

  }
  header .profile-thumbnail {
    width: 50px;
    height: 50px;
    border-radius: 4px;
  }
  header .profile-name {

    margin-left: 10px;
  }
  header .follow-btn {

    margin: 0 0 0 auto;
  }
  header .follow-btn button {
    border: 0;
    border-radius: 3px;
    padding: 5px;
  }
  header h3, header h4 {

    margin: 0;
  }
  #inner p {
    margin-bottom: 10px;
    font-size: 20px;
  }
  #inner hr {
    margin: 20px 0;
    border-style: solid;
    opacity: 0.1;
  }
  footer {

  }
  footer .stats {

    font-size: 15px;
  }
  footer .stats strong {
    font-size: 18px;
  }
  footer .stats .likes {
    margin-left: 10px;
  }
  footer .cta {
    margin-left: auto;
  }
  footer .cta button {
    border: 0;
    background: transparent;
  }
</style>
<header>
  <img src="https://freecodecamp.s3.amazonaws.com/quincy-twitter-photo.jpg" alt="Quincy Larson's profile picture" class="profile-thumbnail">
  <div class="profile-name">
    <h3>Quincy Larson</h3>
    <h4>@ossia</h4>
  </div>
  <div class="follow-btn">
    <button>Follow</button>
  </div>
</header>
<div id="inner">
  <p>I meet so many people who are in search of that one trick that will help them work smart. Even if you work smart, you still have to work hard.</p>
  <span class="date">1:32 PM - 12 Jan 2018</span>
  <hr>
</div>
<footer>
  <div class="stats">
    <div class="Retweets">
      <strong>107</strong> Retweets
    </div>
    <div class="likes">
      <strong>431</strong> Likes
    </div>
  </div>
  <div class="cta">
    <button class="share-btn">Share</button>
    <button class="retweet-btn">Retweet</button>
    <button class="like-btn">Like</button>
  </div>
</footer>

--solutions--

<style>
  body {
    font-family: Arial, sans-serif;
  }
  header {
   display: flex;
  }
  header .profile-thumbnail {
    width: 50px;
    height: 50px;
    border-radius: 4px;
  }
  header .profile-name {
    display: flex;
    margin-left: 10px;
  }
  header .follow-btn {
    display: flex;
    margin: 0 0 0 auto;
  }
  header .follow-btn button {
    border: 0;
    border-radius: 3px;
    padding: 5px;
  }
  header h3, header h4 {
    display: flex;
    margin: 0;
  }
  #inner p {
    margin-bottom: 10px;
    font-size: 20px;
  }
  #inner hr {
    margin: 20px 0;
    border-style: solid;
    opacity: 0.1;
  }
  footer {
    display: flex;
  }
  footer .stats {
    display: flex;
    font-size: 15px;
  }
  footer .stats strong {
    font-size: 18px;
  }
  footer .stats .likes {
    margin-left: 10px;
  }
  footer .cta {
    margin-left: auto;
  }
  footer .cta button {
    border: 0;
    background: transparent;
  }
</style>
<header>
  <img src="https://freecodecamp.s3.amazonaws.com/quincy-twitter-photo.jpg" alt="Quincy Larson's profile picture" class="profile-thumbnail">
  <div class="profile-name">
    <h3>Quincy Larson</h3>
    <h4>@ossia</h4>
  </div>
  <div class="follow-btn">
    <button>Follow</button>
  </div>
</header>
<div id="inner">
  <p>I meet so many people who are in search of that one trick that will help them work smart. Even if you work smart, you still have to work hard.</p>
  <span class="date">1:32 PM - 12 Jan 2018</span>
  <hr>
</div>
<footer>
  <div class="stats">
    <div class="Retweets">
      <strong>107</strong> Retweets
    </div>
    <div class="likes">
      <strong>431</strong> Likes
    </div>
  </div>
  <div class="cta">
    <button class="share-btn">Share</button>
    <button class="retweet-btn">Retweet</button>
    <button class="like-btn">Like</button>
  </div>
</footer>