зеркало из https://github.com/mozilla/pjs.git
18 строки
350 B
HTML
18 строки
350 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<style>
|
|
span { color: red }
|
|
:checked + span { color: green }
|
|
input { display: none }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<input checked="checked" id="foo"><span>There should be no red</span>
|
|
<script>
|
|
var foo = document.body.offsetWidth;
|
|
document.getElementById("foo").setAttribute("type", "checkbox");
|
|
</script>
|
|
</body>
|
|
</html>
|