Skip to content

Instantly share code, notes, and snippets.

@yangg
Created March 22, 2012 06:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yangg/2156518 to your computer and use it in GitHub Desktop.
Save yangg/2156518 to your computer and use it in GitHub Desktop.
Checkable star
/**
* Checkable star
*/
.checkable-star { display: none; }
.checkable-star + label { padding: 1px 8px; cursor: pointer; background: url(http://uedsky.com/images/res/star-icons.png) no-repeat; }
.checkable-star + label:hover { background-position: -16px 0; }
.checkable-star:checked + label { background-position: -32px 0; }
<input type="checkbox" class="checkable-star" id="star"><label for="star"></label>
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment