Flex-Wrap and Flex-Flow tutorial in Flexbox CSS

 <!DOCTYPE html>

<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Flex Wrap Flex Flow Flexbox</title>
    <link rel="stylesheet" href="css/Flex_Wrap_Flex_Flow_Flexbox_CSS.css">
</head>

<body>
    <h1>Hello World : CSS Flex-Wrap</h1>
    <div class="container">
        <div class="items item1">One</div>
        <div class="items item2">Two</div>
        <div class="items item3">Three</div>
        <div class="items item4">Four</div>
        <div class="items item5">Five</div>
        <div class="items item6">Six</div>
        <div class="items item7">Seven</div>
        <div class="items item8">Eight</div>
    </div>
</body>

</html>




Below File is css/Flex_Wrap_Flex_Flow_Flexbox_CSS.css File
body {
    font-family: arial, helvetica;
}

h1 {
    padding: 0 0 0 40px;
}

.container {
    background: #eee;
    margin: 50px;
    padding: 10px;
    border: 3px solid #000;
    height: 300px;
    display: flex;
    /* flex-direction: column;
    flex-wrap: wrap-reverse; */

    flex-flow: column wrap-reverse;
}

.item1 {
    background: #ff4500;
}

.item2 {
    background: #9acd32;
}

.item3 {
    background: #9370d8;
}

.item4 {
    background: #ff69b4;
}

.item5 {
    background: #4169e1;
}

.item6 {
    background: #da70d6;
}

.item7 {
    background: #daa520;
}

.item8 {
    background: #7DCEA0;
}

.items {
    color: #ffffff;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    padding: 10px;
    margin: 5px;
}




Comments