-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontainer.html
78 lines (76 loc) · 3.72 KB
/
container.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
66
67
68
69
70
71
72
73
74
75
76
77
78
<!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>Container Queries</title>
<link rel="stylesheet" href="css/container.css">
<script src="https://kit.fontawesome.com/b182c44c0a.js" crossorigin="anonymous"></script>
</head>
<body>
<header>
<h1>conTaIner querIes</h1>
</header>
<nav>
<div class="card-wrapper">
<div class="card">
<div class="image">
<img src="https://images.unsplash.com/photo-1526505262320-81542978f63b" width="1080" height="720" />
<a href="https://unsplash.com/photos/5dgHxsvJ170" target="_blank">girl and boy holding balloon Lego minifigures</a> by <a href="https://unsplash.com/@helloimnik" target="_blank">Hello I'm Nik</a>
</div>
<div class="description">
<p><code>This is a card component that appears differently depending on the size of it's parent.</code></p>
</div>
<a href="#" class="cta">CALL TO ACTION!</a>
</div>
</div>
</nav>
<main>
<p>
<strong>@contain</strong><br />
Style an element based on the size of it's parent container!
</p>
<div class="card-wrapper">
<div class="card">
<div class="image">
<img src="https://images.unsplash.com/photo-1526505262320-81542978f63b" width="1080" height="720" />
<a href="https://unsplash.com/photos/5dgHxsvJ170" target="_blank">girl and boy holding balloon Lego minifigures</a> by <a href="https://unsplash.com/@helloimnik" target="_blank">Hello I'm Nik</a>
</div>
<div class="description">
<p><code>This is a card component that appears differently depending on the size of its parent.</code></p>
</div>
<a href="#" class="cta">CALL TO ACTION!</a>
</div>
</div>
</main>
<aside>
<div class="card-wrapper">
<div class="card">
<div class="image">
<img src="https://images.unsplash.com/photo-1526505262320-81542978f63b" width="1080" height="720" />
<a href="https://unsplash.com/photos/5dgHxsvJ170" target="_blank">girl and boy holding balloon Lego minifigures</a> by <a href="https://unsplash.com/@helloimnik" target="_blank">Hello I'm Nik</a>
</div>
<div class="description">
<p><code>This is a card component that appears differently depending on the size of it's parent.</code></p>
</div>
<a href="#" class="cta">CALL TO ACTION!</a>
</div>
</div>
</aside>
<footer>
<div class="card-wrapper">
<div class="card">
<div class="image">
<img src="https://images.unsplash.com/photo-1526505262320-81542978f63b" width="1080" height="720" />
<a href="https://unsplash.com/photos/5dgHxsvJ170" target="_blank">girl and boy holding balloon Lego minifigures</a> by <a href="https://unsplash.com/@helloimnik" target="_blank">Hello I'm Nik</a>
</div>
<div class="description">
<p><code>This is a card component that appears differently depending on the size of it's parent.</code></p>
</div>
<a href="#" class="cta">CALL TO ACTION!</a>
</div>
</div>
</footer>
</body>
</html>