Skip to content

Instantly share code, notes, and snippets.

@ootz0rz
Created March 6, 2012 01:13
Show Gist options
  • Save ootz0rz/1982665 to your computer and use it in GitHub Desktop.
Save ootz0rz/1982665 to your computer and use it in GitHub Desktop.
CSS3 checkbox
li:before {
/* add space, create an "L" from borders, and rotate to make a checkmark */
content:"\00a0";
/* Make it a small rectangle so the border will create an L-shape */
width: 6px;
height: 12px;
/* Add a white border on the bottom and left, creating that 'L' */
border: solid #fff;
border-width: 0 3px 3px 0;
/* position relative to text */
position: absolute;
left: 10px;
top: 40%;
margin-top: -6px;
/* Rotate the L 45 degrees to turn it into a checkmark */
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-o-transform: rotate(45deg);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment