forked from jsfiddle/css-reference
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
117 lines (92 loc) · 7.01 KB
/
Copy pathindex.html
File metadata and controls
117 lines (92 loc) · 7.01 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
---
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" target="_blank">Link</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="{{site.url}}/#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.is-alpha { float: left;text-align: center; }.clear .block.is-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 is-alpha">Float left<br>block</p><p class="block is-beta">Float right</p><p class="block is-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 is-alpha">Float left</p><p class="block is-beta">Tall<br>float<br>right<br>block</p><p class="block is-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.is-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 is-alpha">Tall<br>float<br>left<br>block</p><p class="block is-beta">Float right</p><p class="block is-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.is-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 is-alpha">Float left</p><p class="block is-beta">Float right</p><p class="block is-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.is-yellow { clear: both; }</style>
</section>
</section>