Monday, 18 January 2021

CSS_Media_Queries

                              CSS_Media_Queries

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Media Queries</title>
</head>
<style>
.box {
padding25px;
text-aligncenter;
background-coloraquamarine;
margin5px 25%;
font-sizexx-large;
display:none;
}
@media only screen and (max-width500px) {
    #box1 {
         displayblock;
    }
}
@media only screen and (min-width500px) and (max-width700px) {
    #box2 {
         displayblock;
         coloryellow;
         background-colorblueviolet;
    }
}
@media only screen and (min-width700px) and (max-width1000px) {
    #box3 {
         displayblock;
         colorazure;
         background-colorcyan;
    }
}
@media only screen and (min-width1000px) and (max-width1300px) {
    #box4 {
         displayblock;
         colorazure;
         background-colorpink;
    }
}
@media only screen and (min-width1300px)  {
    #box5 {
         displayblock;
         colorazure;
         background-colorsteelblue;
    }
}
</style>
<body>
    <div class="box" id="box1">I have a Oppo Mobile</div>
    <div class="box" id="box2">I have a Vivo Mobile</div>
    <div class="box" id="box3">I have a Samsung Mobile</div>
    <div class="box" id="box4">I have a Infinix Mobile</div>
    <div class="box" id="box5">I have a Iphone Mobile</div>
</body>
</html>

   

No comments:

Post a Comment

Get Phone Number Details Using Python

 Get Phone Number Details Using Python Import Python module PHONENUMBERS using command " pip install phonenumbers" in you CLI Then...