freeCodeCamp/curriculum/challenges/russian/01-responsive-web-design/css-flexbox/use-the-flex-direction-prop...

72 lines
2.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
id: 587d78ab367417b2b2512af2
title: Use the flex-direction Property to Make a Row
challengeType: 0
videoUrl: ''
localeTitle: Используйте свойство flex-direction для создания строки
---
## Description
<section id="description"> Добавление <code>display: flex</code> к элементу превращает его в гибкий контейнер. Это позволяет разместить любые дочерние элементы этого элемента в строки или в столбцы. Чтобы сделать это, нужно добавить свойство <code>flex-direction</code> к родительскому элементу и устанавить ему значение row (строка) или column (столбец). Значение row выравнивает дочерние элементы по горизонтали, а значение column выравнивает дочерние элементы по вертикали. Другие варианты значений свойства <code>flex-direction</code> - row-reverse (обращённая строка) и column-reverse (обращённый столбец). <strong>Примечание</strong> <br> Значением по умолчанию для свойства <code>flex-direction</code> является row. </section>
## Instructions
<section id="instructions"> Добавьте CSS свойство <code>flex-direction</code> элементу <code>#box-container</code> и присвойте ему значение row-reverse. </section>
## Tests
<section id='tests'>
```yml
tests:
- text: 'Элемент <code>#box-container</code> должен иметь свойство <code>flex-direction</code> со значением row-reverse.'
testString: 'assert($("#box-container").css("flex-direction") == "row-reverse", "The <code>#box-container</code> element should have a <code>flex-direction</code> property set to row-reverse.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<style>
#box-container {
display: flex;
height: 500px;
}
#box-1 {
background-color: dodgerblue;
width: 50%;
height: 50%;
}
#box-2 {
background-color: orangered;
width: 50%;
height: 50%;
}
</style>
<div id="box-container">
<div id="box-1"></div>
<div id="box-2"></div>
</div>
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>