---
id: 587d78ab367417b2b2512af2
title: Use the flex-direction Property to Make a Row
challengeType: 0
videoUrl: ''
localeTitle: 使用flex-direction属性创建一行
---
## Description
添加display: flex
to a element将其转换为flex容器。这使得可以将该元素的任何子节点对齐成行或列。您可以通过将flex-direction
属性添加到父项并将其设置为行或列来完成此操作。创建行将水平对齐子项,创建列将垂直对齐子项。 flex-direction
其他选项是row-reverse和column-reverse。 注意
flex-direction
属性的默认值为row。
## Instructions
将CSS属性flex-direction
添加到#box-container
元素,并为其赋值row-reverse。
## Tests
```yml
tests:
- text: '#box-container
元素的flex-direction
属性应设置为row-reverse。'
testString: 'assert($("#box-container").css("flex-direction") == "row-reverse", "The #box-container
element should have a flex-direction
property set to row-reverse.");'
```
## Challenge Seed
## Solution
```js
// solution required
```