807 B
807 B
title, localeTitle
title | localeTitle |
---|---|
Use the flex-direction Property to Make a Row | 使用flex-direction属性创建一行 |
使用flex-direction属性创建一行
一旦你有一个flex容器,通过添加_display:flex;_在父容器中,您可以通过添加以下内容指定是否要将子项堆叠在一行中:
#box-container {
display: flex; /* This makes the flex container */
height: 500px;
flex-direction: row-reverse; /* This makes the direction be a row with reversed elements */
}
您会注意到颜色如何切换位置,因为Flex容器的默认方向是行,您可能已经从tweet示例中注意到了这一点。