freeCodeCamp/guide/chinese/certifications/responsive-web-design/css-flexbox/use-display-flex-to-positio.../index.md

18 lines
514 B
Markdown
Raw Normal View History

---
title: "Use display: flex to Position Two Boxes"
localeTitle: “使用显示器
---
## 使用displayflex定位两个Box
[Flexbox](https://github.com/freecodecamp/guides/tree/master/src/pages/css/layout/flexbox/index.md)是一种在CSS3中构建内容的方法允许您创建响应式网站。
这个挑战是在使用Flexbox时设置第一步。您需要通过添加_displayflex;_使父容器成为flex容器_。_到它的CSS部分。
例:
```CSS
#main-container {
display: flex;
}
```