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

18 lines
514 B
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.

---
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;
}
```