blob: dbdfe62a6aa290aad0da5605e63764b57a9109f6 (
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
|
<html>
<head>
<title>:empty test</title>
<style>
.box {
background-color: pink;
height: 80px;
width: 80px;
}
.box:empty {
background-color: lime;
}
</style>
</head>
<body>
<div class="box"><!-- I will be lime. --></div>
<div class="box">I will be pink.</div>
<div class="box">
<!-- I will be pink in older browsers because of the whitespace around this comment. -->
</div>
<div class="box">
<p><!-- I will be pink in all browsers because of the non-collapsible whitespace and elements around this comment. --></p>
</div>
</body>
</html>
|