---
id: 587d78ab367417b2b2512af0
title: 'Use display: flex to Position Two Boxes'
challengeType: 0
videoUrl: ''
localeTitle: 使用display:flex定位两个Box
---
## Description
本节使用交替挑战样式来展示如何使用CSS以灵活的方式定位元素。首先,挑战将解释理论,然后使用简单推文组件的实际挑战将应用flexbox概念。放置CSS属性display: flex;
在元素上允许您使用其他flex属性来构建响应式页面。
## Instructions
将CSS属性display
添加到#box-container
并将其值设置为flex。
## Tests
```yml
tests:
- text: '#box-container
应将display
属性设置为flex值。'
testString: 'assert($("#box-container").css("display") == "flex", "#box-container
should have the display
property set to a value of flex.");'
```
## Challenge Seed
## Solution
```js
// solution required
```