media queris in css
responsive design in css
<!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>Media queries</title>
</head>
<style>
.box{
font-size: 100px;
background-color: blueviolet;
color: white;
border: 1px solid black;
display: none;
}
@media only screen and (max-width:350px){
#box1{
display:block;
background-color:green;
color:white;
}
}
@media only screen and (min-width:350px) and (max-width:750px) {
#box2{
display:block;
background-color:violet;
color:white;
}
}
@media only screen and (min-width:750px) and (max-width:1000px) {
#box3{
display:block;
background-color:cyan;
color:white;
}
}
@media only screen and (min-width:1000px) {
#box4{
display:block;
background-color:red;
color:white;
}
}
</style>
<body>
<div class="box" id="box1">Phone ke liye</div>
<div class="box" id="box2">Tablets ke liye</div>
<div class="box" id="box3">Dsktop computer ke liye</div>
<div class="box" id="box4">Wide screen ke liye</div>
</body>
</html>
Thanks you for commenting your questions. I will see question and respond you.