CSS |柔流属性

原文:https://www.geeksforgeeks.org/css-flex-flow-property/

柔性流属性是柔性盒布局模块的子属性,也是柔性卷绕和柔性方向的简写属性。 注意:当元素不是柔性项时,柔性属性没有用。

语法:

flex-flow: flex-direction flex-wrap;

柔性流特性的值:

  • row nowrap: It arrange the row same as text direction and the default value of wrap-flex is nowrap. It is used to specify that the item has no wrap. It makes item wrap in single lines.

    语法:

    html flex-flow: row nowrap;

    示例:

    ```html <!DOCTYPE html>

        flex-flow property              #main {             width: 400px;             height: 300px;             border: 2px solid black;             display: flex;             flex-flow: row nowrap;         }

    #main div {             width: 100px;             height: 50px;         }

    h1 {             color: #009900;             font-size: 42px;             margin-left: 50px;         }

    h3 {             margin-top: -20px;             margin-left: 50px;         }     

        

    GeeksforGeeks

        

    The flex-flow:row nowrap

        
            
    1
            
    2
            
    3
            
    4
            
    5
            
    6
        

```