Блокове с FlexBox

mail@pastecode.io avatar
unknown
plain_text
2 years ago
1.6 kB
2
Indexable
Never
<!DOCTYPE html>
<html>
<head>
<title>Блокове с Flexbox</title>   



    <style>
        .BaseBlocks {
            width: 700px;
            margin: 0 auto;
            padding : 0;
        }

        #block1 {
            background: aqua;
        }

        #block2 {
            background: brown;
        }

        #block3 {
            background: burlywood;
        }

        #block4 {
            background: cadetblue;
        }

        #block5 {
            background: coral;
        }

        span {
            font-weight: bold;
        }

        div[id] {
            text-align: center; padding: 10px;
        }

        .inner-block {
            width:300px;
            height: 300px;
        }

        .container {
            display: flex;
            flex-direction: row;
            flex-wrap: nowrap;
            justify-content: flex-start;
            align-items: stretch;
            align-content: stretch;
        }
    </style>
    </head>

    <body>
        <div id = "block1" class="baseBlocks"> 
            <span>блок 1</span>
        </div>

        <div id ="block2" class="BaseBlocks container">

        <div id ="block3" class="inner-block">
        <span>Блок 3</span>
        </div>
       
        <div id ="block4" class="inner-block">
        <span>Блок 4</span>
        </div>
        
        
        
        <div id ="block5" class="inner-block">
        <span>Блок 5</span>
        </div>

        <span>Блок 2</span>
        
        </div>
    </body>

</html>