Skip to content

Instantly share code, notes, and snippets.

@ignovak
Created May 23, 2014 07:44
Show Gist options
  • Save ignovak/a383720ed936885375e4 to your computer and use it in GitHub Desktop.
Save ignovak/a383720ed936885375e4 to your computer and use it in GitHub Desktop.
Untitled
.star {
float: left;
color: #aaa;
border-style: solid;
border-color: currentColor transparent;
border-width: 8px 10px 0;
margin-top: 6px;
transition: all 0.15s ease-in-out;
}
.star::before,
.star::after {
content: '';
position: absolute;
border-style: solid;
}
.star::before {
border-width: 0 8px 20px;
border-color: currentColor transparent;
margin-top: -16px;
margin-left: -8px;
}
.star::after {
border-width: 0 10px 7px;
border-color: #fff transparent;
margin-top: -1px;
margin-left: -10px;
}
.stars:hover .star {
color: #faa;
}
.star:hover, .star:hover ~ .star {
color: #aaa;
}
<div class="stars">
<div class="star"></div>
<div class="star"></div>
<div class="star"></div>
<div class="star"></div>
<div class="star"></div>
</div>
// alert('Hello world!');
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment