Skip to content

Instantly share code, notes, and snippets.

@alex-boom
Last active March 20, 2019 12:19
Show Gist options
  • Save alex-boom/899151d06c48714415cf326a5d4e442e to your computer and use it in GitHub Desktop.
Save alex-boom/899151d06c48714415cf326a5d4e442e to your computer and use it in GitHub Desktop.
star-raiting
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>star raiting</title>
<style>
.star-ratings {
display: inline-block;
position: relative;
color: #c5c5c5;
font-size: 21px;
text-shadow: 0px 1px 0 #a2a2a2;
@include media('>=tablet') {
font-size: 20px;
}
span {
display: inline-block;
padding: 0 1px;
}
&-top {
white-space: nowrap;
color: red;
padding: 0;
position: absolute;
z-index: 1;
display: block;
top: 0;
left: 0;
overflow: hidden;
}
&-bottom {
padding: 0;
display: block;
z-index: 0;
}
}
</style>
</head>
<body>
<div class="star-ratings">
<div class="star-ratings-top" style="width: 80%"><span>★</span><span>★</span><span>★</span><span>★</span><span>★</span></div>
<div class="star-ratings-bottom"><span>★</span><span>★</span><span>★</span><span>★</span><span>★</span></div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment