-
Notifications
You must be signed in to change notification settings - Fork 843
/
Copy pathcard--download.html
122 lines (96 loc) · 2.94 KB
/
card--download.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<!-- this is an example from the MDN Layout Cookbook -->
<title>CSS Cookbook: card component</title>
<style>
/* body rules included when showing the example as a live example */
body {
background-color: #fff;
color: #333;
font: 1.2em / 1.5 Helvetica Neue, Helvetica, Arial, sans-serif;
padding: 0;
margin: 0;
}
img {
max-width: 100%;
}
.cards {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
grid-gap: 20px;
max-width: 800px;
margin: 1em auto;
}
.card {
display: grid;
grid-template-rows: max-content 200px 1fr;
border: 1px solid #999;
border-radius: 3px;
}
.card img {
object-fit: cover;
width: 100%;
height: 100%;
}
.card h2 {
margin: 0;
padding: .5rem;
}
.card .content {
padding: .5rem;
}
.card footer {
background-color: #333;
color: #fff;
padding: .5rem;
}
</style>
</head>
<body>
<div class="cards">
<article class="card">
<header>
<h2>A short heading</h2>
</header>
<img src="balloons.jpg" alt="Hot air balloons">
<div class="content">
<p> The idea of reaching the North Pole by means of balloons appears to have been entertained many
years ago. </p>
</div>
</article>
<article class="card">
<header>
<h2>A short heading</h2>
</header>
<img src="balloons2.jpg" alt="Hot air balloons">
<div class="content">
<p>Short content.</p>
</div>
<footer>I have a footer!</footer>
</article>
<article class="card">
<header>
<h2>A longer heading in this card</h2>
</header>
<img src="balloons.jpg" alt="Hot air balloons">
<div class="content">
<p>In a curious work, published in Paris in 1863 by Delaville Dedreux, there is a
suggestion for reaching the North Pole by an aerostat.</p>
</div>
<footer>I have a footer!</footer>
</article>
<article class="card">
<header>
<h2>A short heading</h2>
</header>
<img src="balloons2.jpg" alt="Hot air balloons">
<div class="content">
<p> The idea of reaching the North Pole by means of balloons appears to have been entertained many
years ago. </p>
</div>
</article>
</div>
</body>
</html>