Source code

Revision control

Copy as Markdown

Other Tools

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<head>
<title>CSS Test: Counter-increment on pseudo-element and 'display: none' on element</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<meta name="assert" content="An element that is set to 'display: none' does not increment counters when increment is on the pseudo-element." />
<style type="text/css">
#div1
{
display: none;
}
div:before
{
counter-increment: hidden 1;
content: counter(hidden);
}
</style>
</head>
<body>
<p>Test passes if the numbers '1', '1' and '1' are below.</p>
<div></div>
<div id="div1"></div>
<div></div>
<div></div>
</body>
</html>