responsiveflexbox

css:---

*{
    margin0px;
    padding0px;
    box-sizingborder-box;
}
.container{
    marginauto;
/* width: 550px; */
height:200px;
border:2px solid red;
displayflex;
flex-wrapwrap;
gap1em;
/* align-content: space-around; */
/* column-gap: 1em;
row-gap: 1em; */
/* display: flex;
flex-flow:row-reverse wrap; */
/* flex-wrap: wrap; */
/* align-items:stretch; */
/* justify-content: center; */
}
.item1{
    flex1 0 200px;
    /* flex-grow: 3; */
    height100px;
    /* width: 100px; */
    background-coloraqua;
    /* order: 4; */
}
.item2{
    flex1 0 200px;
    /* order: 3; */
    /* flex-grow: 2; */
    height100px;
    /* width: 100px; */
    background-coloryellow;
}
.item3{
    flex1 0 200px;
    /* flex-grow: 5;
    flex-shrink: 0; */
    /* order: 1; */
    height100px;
    /* flex-basis: 200px; */
    background-colorgreen;
}
.item4{
    flex1 0 200px;
    flex-wrap2;
    /* order: 2; */
    height100px;
    /* width: 100px; */
    background-colorblue;
}
img{
    height100%;
    width100%;
}


html:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="style/style2.css">
</head>
<body>
    <div class="container">
        <div class="item1">
            <img src="images/img.jpg" alt="">
        </div>
        <div class="item2">
            <img src="images/img1.jpg" alt="">
        </div>
        <div class="item3">
            <img src="images/img2.jpg" alt="">
        </div>
        <div class="item4">
            <img src="images/img3.jpg" alt="">
        </div>
    </div>
</body>

</html> 

Comments

Popular posts from this blog

interview questions js[ Anurag Singh ProCodrr]

reactnative_creation