Circle Meter that is filled based on the value of the score.
A Pen by Shiva Narrthine on CodePen.
Circle Meter that is filled based on the value of the score.
A Pen by Shiva Narrthine on CodePen.
<div class="circle"> | |
<div class="fill"> | |
</div> | |
<h3 class="score">50%</h3> | |
</div> |
var score = $(".score").text(); | |
$(".fill").css("height",score); |
.circle{ | |
position: relative; | |
width: 200px; | |
height: 200px; | |
background: #bdc3c7; | |
-webkit-border-radius: 100px; | |
-moz-border-radius: 100px; | |
border-radius: 100px; | |
overflow: hidden; | |
} | |
.fill{ | |
position: absolute; | |
bottom: 0; | |
width: 100%; | |
height: 80%; | |
background: #1abc9c; | |
} | |
.score{ | |
position: absolute; | |
width: 100%; | |
top: 25px; | |
text-align: center; | |
font-family: Arial, sans serif; | |
color: #fff; | |
font-size: 50pt; | |
line-height: 0; | |
font-weight: normal; | |
} |