Files
freeCodeCamp/curriculum/challenges/russian/01-responsive-web-design/applied-visual-design/create-visual-balance-using-the-text-align-property.russian.md
Veronika Krukovich 525cdcd475 fix challenges translation into russian (#36886)
* fix challenges translation into russian

* Fix spelling center in russian
2019-12-20 20:52:47 +05:30

3.7 KiB
Raw Blame History

id, title, challengeType, videoUrl, forumTopicId, localeTitle
id title challengeType videoUrl forumTopicId localeTitle
587d7791367417b2b2512ab3 Create Visual Balance Using the text-align Property 0 https://scrimba.com/c/c3b4EAp 301053 Создание визуального баланса Использование свойства text-align

Description

Этот раздел учебной программы посвящен прикладному визуальному дизайну. Первая группа задач основывается на данном макете карты, чтобы показать ряд основных принципов. Текст часто является большой частью веб-контента. CSS имеет несколько вариантов выравнивания его свойством text-align . text-align: justify; вызывает все строки текста, кроме последней строки, для соответствия левому и правому краям строки. text-align: center; центрирует текст text-align: right; выравнивание по правому краю текста и text-align: left; (по умолчанию) выравнивает текст по левому краю.

Instructions

Необходимо выровнять текст тега h4, в котором говорится «Google», по центру. Затем выровнять тег абзаца, который содержит информацию о том, как Google был основан.

Tests

tests:
  - text: Your code should use the text-align property on the <code>h4</code> tag to set it to center.
    testString: assert($('h4').css('text-align') == 'center');
  - text: Your code should use the text-align property on the <code>p</code> tag to set it to justify.
    testString: assert($('p').css('text-align') == 'justify');

Challenge Seed

<style>
  h4 {

  }
  p {

  }
  .links {
    margin-right: 20px;

  }
  .fullCard {
    border: 1px solid #ccc;
    border-radius: 5px;
    margin: 10px 5px;
    padding: 4px;
  }
  .cardContent {
    padding: 10px;
  }
</style>
<div class="fullCard">
  <div class="cardContent">
    <div class="cardText">
      <h4>Google</h4>
      <p>Google was founded by Larry Page and Sergey Brin while they were Ph.D. students at Stanford University.</p>
    </div>
    <div class="cardLinks">
      <a href="https://en.wikipedia.org/wiki/Larry_Page" target="_blank" class="links">Larry Page</a>
      <a href="https://en.wikipedia.org/wiki/Sergey_Brin" target="_blank" class="links">Sergey Brin</a>
    </div>
  </div>
</div>

Solution

<style>
  h4 {
    text-align: center;
  }
  p {
    text-align: justify;
  }
  .links {
    margin-right: 20px;

  }
  .fullCard {
    border: 1px solid #ccc;
    border-radius: 5px;
    margin: 10px 5px;
    padding: 4px;
  }
  .cardContent {
    padding: 10px;
  }
</style>
<div class="fullCard">
  <div class="cardContent">
    <div class="cardText">
      <h4>Google</h4>
      <p>Google was founded by Larry Page and Sergey Brin while they were Ph.D. students at Stanford University.</p>
    </div>
    <div class="cardLinks">
      <a href="https://en.wikipedia.org/wiki/Larry_Page" target="_blank" class="links">Larry Page</a>
      <a href="https://en.wikipedia.org/wiki/Sergey_Brin" target="_blank" class="links">Sergey Brin</a>
    </div>
  </div>
</div>