You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/examples/visible.md
+66-4Lines changed: 66 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,28 +14,36 @@ This `span` element is visible (by default, elements are visible).
14
14
15
15
## Hidden with CSS visibility
16
16
17
-
This `span` element is not visible because of the CSS`visibility` property.
17
+
This `span` element is not visible because of the CSS`visibility` property.
18
18
19
19
```html
20
20
<spanstyle="visibility: hidden">I'm the invisible man</span>
21
21
```
22
22
23
23
## Hidden with CSS display
24
24
25
-
This `span` element is not visible because of the CSS`display` property.
25
+
This `span` element is not visible because of the CSS`display` property.
26
26
27
27
```html
28
28
<spanstyle="display: none">I'm the invisible man</span>
29
29
```
30
30
31
31
## Hidden with CSS position
32
32
33
-
This`span`element is not visible because it is positioned off-screen
33
+
These`span`elements are not visible because they are positioned off-screen. Note that depending on device size and actual position of the `span` elements, they might be visible on some larger device or long pages.
34
34
35
35
```html
36
36
<spanstyle="position: absolute; top: -9999px; left: -9999px;">Incredible how you can</span>
37
37
```
38
38
39
+
```html
40
+
<spanstyle="position: absolute; top: -9999px">See right through me</span>
41
+
```
42
+
43
+
```html
44
+
<spanstyle="position: absolute; left: -9999px;">When you hear a sound</span>
45
+
```
46
+
39
47
## Hidden due to a lack of content
40
48
41
49
This `span` element is not visible because it contains only whitespace and line breaks.
@@ -47,12 +55,66 @@ This `span` element is not visible because it contains only whitespace and line
47
55
</span>
48
56
```
49
57
58
+
This `span` element is not visible because its text content has size 0.
59
+
60
+
```html
61
+
<spanstyle="font-size: 0px">That you just can't place</span>
62
+
```
63
+
50
64
## Hidden due to matching colors
51
65
52
66
This `span` element is not visible because it has the exact same color as its background.
53
67
54
68
```html
55
-
<spanstyle="color: #00F; background: #00F;">See right through me</span>
0 commit comments