-
Notifications
You must be signed in to change notification settings - Fork 0
/
responsiveness.html
65 lines (62 loc) · 1.89 KB
/
responsiveness.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body{
background-color: rgb(234, 202, 75);
}
.d1{
background-color: tomato;
font-size: large;
padding: 30px;
font-weight: bolder;
}
@media only screen and (max-width: 400px)
{
.d1{
display: none;
}
}
.d2{
background-color: aliceblue;
}
@media only screen and (max-width: 600px)
{
.d2{
background-color: palegreen;
}
}
@media only screen and (max-width: 300px)
{
.d2{
background-color: lightskyblue;
}
}
.d3{
background-color: tomato;
color: white;
}
@media only screen and (max-width: 600px)
{
a{
text-align: center;
display: block;
}
}
</style>
</head>
<body>
<div class="d1">
Hide elements on different screen sizes.
</div>
<div class="d2">
<h3>Resize to see the effect!</h3>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Quae, reiciendis. Voluptates rerum suscipit accusamus optio totam eum dolor repellendus et autem, vero illo explicabo cupiditate quos ex, eveniet, aperiam similique.</p>
</div>
<div class="d3">
<a href="#">Link 1</a>
<a href="#">Link 2</a>
<a href="#">Link 3</a>
</div>
</body>
</html>