blob: 1e8e96df13f8525bd964538d9f453adf3ff80cb0 (
plain)
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
|
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<title>content-visibility and paint containment (reference)</title>
<style>
.container {
width: 100px;
height: 100px;
background: green;
}
.hidden {
contain: layout paint style;
}
.visible {
contain: none;
}
#overflowing {
width: 400px;
height: 100px;
}
.square {
display: inline-block;
width: 50px;
height: 50px;
margin: 5px;
}
.red {
background: red;
}
.green {
background: green;
}
</style>
<body>
<p>PASS if you see a green square and no red.</p>
<div class="hidden container">
<div id="overflowing"><div class="square"></div><div class="square"></div><div class="red square"></div></div>
</div>
<p>PASS if you see <em>two</em> green squares.</p>
<div class="visible container">
<div id="overflowing"><div class="square"></div><div class="square"></div><div class="green square"></div></div>
</div>
</body>
</html>
|