Thursday, 27 May 2021

Mediaquery

 

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Mediaquery</title>
</head>
<style>
.box{
font-size50px;
    border2px solid black;
    background-colorred;
    colorwhite;
    text-aligncenter;
    displaynone;
}

@media (max-width300px){
    #box-1{displayblock;
        background-color:green;
    }
}

@media (min-width300px ) and  (max-width500px){
    #box-2{displayblock;
        background-color:red;
    }
}

@media (min-width500px) and  (max-width900px){
    #box-3{displayblock;
        background-color:yellow;
    }
}

@media (min-width900px ){
    #box-4{displayblock;
        background-color:blue;
    }
}

</style>
<body>
    <div class="box" id="box-1">Main ek Iphone hoon</div>
    <div class="box" id="box-2">Main ek Tablet hoon</div>
    <div class="box" id="box-3">Main ek Laptop hoon</div>
    <div class="box" id="box-4">Main ek Widescreen hoon</div>
</body>
</html>

No comments:

Python if / else

 Python if / else a1 = int ( input (" Enter the number: \n ")) a2 = int ( input (" Enter the number: \n ")) a3 = int ( i...