Flex Container - MDN Web Docs Glossary: Definitions of Web-related terms 编辑
A flexbox layout is defined using the flex
or inline-flex
values of the display
property on the parent item. This element then becomes a flex container, and each one of its children becomes a flex item.
A value of flex
causes the element to become a block level flex container, and inline-flex
an inline level flex container. These values create a flex formatting context for the element, which is similar to a block formatting context in that floats will not intrude into the container, and the margins on the container will not collapse with those of the items.
Learn more
Property reference
Further reading
- CSS Flexbox Guide: Basic Concepts of Flexbox
- CSS Flexbox Guide: Aligning items in a flex container
- CSS Flexbox Guide: Mastering wrapping of flex items
- Firefox Developer Tools > How to: CSS Flexbox Inspector: Examine Flexbox layouts
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论