Created
May 13, 2015 10:40
-
-
Save subzey/66fbb7d5ac931712848c to your computer and use it in GitHub Desktop.
@document demo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>@document demo</title> | |
<style> | |
body { | |
text-align: center; | |
} | |
.foo { | |
margin: .5em; | |
display: inline-block; | |
width: 40px; | |
height: 40px; | |
background: #ccc; | |
border-radius: 50%; | |
box-shadow: inset rgba(255, 255, 255, .5) 1px 1px 3px, rgba(0, 0, 0, .25) 1px 1px 3px; | |
} | |
@-moz-document regexp(".*1=.*"){ | |
.foo:nth-of-type(1) { | |
background: green; | |
} | |
} | |
@-moz-document regexp(".*2=.*"){ | |
.foo:nth-of-type(2) { | |
background: green; | |
} | |
} | |
@-moz-document regexp(".*3=.*"){ | |
.foo:nth-of-type(3) { | |
background: green; | |
} | |
} | |
@-moz-document regexp(".*4=.*"){ | |
.foo:nth-of-type(4) { | |
background: green; | |
} | |
} | |
</style> | |
</head> | |
<body> | |
<div class="foo"></div> | |
<div class="foo"></div> | |
<div class="foo"></div> | |
<div class="foo"></div> | |
<form> | |
<fieldset> | |
<p> | |
<input type="checkbox" name="1"/> | |
<input type="checkbox" name="2"/> | |
<input type="checkbox" name="3"/> | |
<input type="checkbox" name="4"/> | |
</p> | |
<p> | |
<input type="submit"> | |
</p> | |
</fieldset> | |
</form> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment