2007-11-07 20:13:00 +03:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
2010-01-28 02:46:48 +03:00
|
|
|
<title>CSS 2.1 Test Suite: :first-line</title>
|
|
|
|
<link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
|
|
|
|
<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
|
|
|
|
<link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#first-line"/>
|
|
|
|
<meta name="flags" content="dom" />
|
2007-11-07 20:13:00 +03:00
|
|
|
<style>
|
|
|
|
div { color: green }
|
|
|
|
div::first-line { color: red }
|
|
|
|
</style>
|
|
|
|
<script>
|
|
|
|
function runTest() {
|
|
|
|
var s = document.createElement("span");
|
|
|
|
s.setAttribute("style", "float: left");
|
|
|
|
s.appendChild(document.createTextNode("This should be green"));
|
|
|
|
var i = document.getElementById("i");
|
|
|
|
i.parentNode.insertBefore(s, i);
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body onload="runTest()">
|
|
|
|
<div><span id="i"></span></div>
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
|