forked from jgthms/css-reference
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
259 lines (252 loc) · 8.37 KB
/
Copy pathindex.html
File metadata and controls
259 lines (252 loc) · 8.37 KB
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
---
layout: single
property_name: clear
---
<section id="clear" class="property">
<header class="property-header">
<nav class="property-links">
<a
class="property-links-direct"
href="{{site.url}}/property/clear/"
data-property-name="clear"
data-tooltip="Single page for this property"
>Permalink</a
>
<a
class="property-share"
data-tooltip="Share on Twitter or Facebook"
data-property-name="clear"
>Share</a
>
<a
target="_blank"
href="https://developer.mozilla.org/en/docs/Web/CSS/clear"
data-tooltip="See on Mozilla Developer Network"
rel="external"
>MDN</a
>
</nav>
<h2 class="property-name">
<a href="#clear"><span>#</span>clear</a>
</h2>
<div class="property-description">
<p>Moves the element after all the preceding floating elements.</p>
</div>
</header>
<style type="text/css">
.clear .block--alpha {
float: left;
text-align: center;
}
.clear .block--beta {
float: right;
text-align: center;
}
</style>
<section class="example">
<header class="example-header">
<p class="example-name">
<code
class="example-value"
data-tooltip="Click to copy"
data-clipboard-text="clear: none;"
>clear: none;</code
>
</p>
<div class="example-description">
<p>
The <strong>clear</strong> property is only relevant when used with
siblings that have a <strong>float</strong> value.
</p>
<p>
The element will sit <strong>alongside</strong> any floated element
that <em>precedes</em> it.
</p>
</div>
</header>
<aside class="example-preview">
<div class="example-browser"><i></i><i></i><i></i></div>
<div class="example-output">
<div class="example-output-div clear" id="clear-none">
<p class="block">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam
semper diam at erat pulvinar, at pulvinar felis blandit. Vestibulum
volutpat tellus diam, consequat gravida libero rhoncus ut.
</p>
<p class="block block--alpha">Float left<br />block</p>
<p class="block block--beta">Float right</p>
<p class="block block--yellow">
<strong>This is the clear none block</strong>. It lives alongside
its floating siblings. It takes up the remaining space left in
between.
</p>
<p class="block">
Maecenas imperdiet felis nisi, fringilla luctus felis hendrerit sit
amet. Pellentesque interdum, nisl nec interdum maximus, augue diam
porttitor lorem, et sollicitudin felis neque sit amet erat.
</p>
</div>
</div>
</aside>
<style type="text/css">
#clear-none {
clear: none;
}
</style>
</section>
<section class="example">
<header class="example-header">
<p class="example-name">
<code
class="example-value"
data-tooltip="Click to copy"
data-clipboard-text="clear: left;"
>clear: left;</code
>
</p>
<div class="example-description">
<p>
The cleared element will move <em>after</em> any left floating element
that precedes it, but will remain alongside right float elements.
</p>
</div>
</header>
<aside class="example-preview">
<div class="example-browser"><i></i><i></i><i></i></div>
<div class="example-output">
<div class="example-output-div clear" id="clear-left">
<p class="block">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam
semper diam at erat pulvinar, at pulvinar felis blandit. Vestibulum
volutpat tellus diam, consequat gravida libero rhoncus ut.
</p>
<p class="block block--alpha">Float left</p>
<p class="block block--beta">Tall<br />float<br />right<br />block</p>
<p class="block block--yellow">
<strong>This is the clear left element</strong>. It comes after the
clear left, but remains alongside the float right.
</p>
<p class="block">
Maecenas imperdiet felis nisi, fringilla luctus felis hendrerit sit
amet. Pellentesque interdum, nisl nec interdum maximus, augue diam
porttitor lorem, et sollicitudin felis neque sit amet erat.
</p>
</div>
</div>
</aside>
<style type="text/css">
#clear-left {
clear: left;
}
</style>
<style type="text/css">
#clear-left .block--yellow {
clear: left;
}
</style>
</section>
<section class="example">
<header class="example-header">
<p class="example-name">
<code
class="example-value"
data-tooltip="Click to copy"
data-clipboard-text="clear: right;"
>clear: right;</code
>
</p>
<div class="example-description">
<p>
The cleared element will move <em>after</em> any right floating
element that precedes it, but will remain alongside left float
elements.
</p>
</div>
</header>
<aside class="example-preview">
<div class="example-browser"><i></i><i></i><i></i></div>
<div class="example-output">
<div class="example-output-div clear" id="clear-right">
<p class="block">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam
semper diam at erat pulvinar, at pulvinar felis blandit. Vestibulum
volutpat tellus diam, consequat gravida libero rhoncus ut.
</p>
<p class="block block--alpha">Tall<br />float<br />left<br />block</p>
<p class="block block--beta">Float right</p>
<p class="block block--yellow">
<strong>This is the clear left element</strong>. It comes after the
clear right, but remains alongside the float left.
</p>
<p class="block">
Maecenas imperdiet felis nisi, fringilla luctus felis hendrerit sit
amet. Pellentesque interdum, nisl nec interdum maximus, augue diam
porttitor lorem, et sollicitudin felis neque sit amet erat.
</p>
</div>
</div>
</aside>
<style type="text/css">
#clear-right {
clear: right;
}
</style>
<style type="text/css">
#clear-right .block--yellow {
clear: right;
}
</style>
</section>
<section class="example">
<header class="example-header">
<p class="example-name">
<code
class="example-value"
data-tooltip="Click to copy"
data-clipboard-text="clear: both;"
>clear: both;</code
>
</p>
<div class="example-description">
<p>
The cleared element will move <em>after</em> any floating element that
precedes it. This includes both left floating and right floating
elements.
</p>
</div>
</header>
<aside class="example-preview">
<div class="example-browser"><i></i><i></i><i></i></div>
<div class="example-output">
<div class="example-output-div clear" id="clear-both">
<p class="block">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam
semper diam at erat pulvinar, at pulvinar felis blandit. Vestibulum
volutpat tellus diam, consequat gravida libero rhoncus ut.
</p>
<p class="block block--alpha">Float left</p>
<p class="block block--beta">Float right</p>
<p class="block block--yellow">
<strong>This is the clear both element</strong>. It comes after both
floating elements.
</p>
<p class="block">
Maecenas imperdiet felis nisi, fringilla luctus felis hendrerit sit
amet. Pellentesque interdum, nisl nec interdum maximus, augue diam
porttitor lorem, et sollicitudin felis neque sit amet erat.
</p>
</div>
</div>
</aside>
<style type="text/css">
#clear-both {
clear: both;
}
</style>
<style type="text/css">
#clear-both .block--yellow {
clear: both;
}
</style>
</section>
</section>