---
id: 587d78ab367417b2b2512af2
challengeType: 0
videoUrl: 'https://scrimba.com/p/pVaDAv/cBEkbfJ'
forumTopicId: 301110
title: 使用 flex-direction 属性创建一行
---
## Description
给元素添加display: flex
属性使其变成 flex 容器。只要给父元素添加flex-direction
属性,并把属性值设置为 row 或 column,即可横排或竖排它的子元素。设为 row 可以让子元素水平排列,设为 column 可以让子元素垂直排列。
flex-direction
的其他可选值还有 row-reverse 和 column-reverse。
注意
flex-direction
的默认值为 row。
## Instructions
为#box-container
添加 CSS 属性flex-direction
,其值设为 row-reverse。
## Tests
```yml
tests:
- text: '#box-container
应有flex-direction
属性,其值应为 row-reverse。'
testString: assert($('#box-container').css('flex-direction') == 'row-reverse');
```
## Challenge Seed
## Solution
```html
// solution required
```