Battery by @fei on dribbble: http://dribbble.com/shots/1209794-Battery
A Pen by Felix De Montis on CodePen.
Battery by @fei on dribbble: http://dribbble.com/shots/1209794-Battery
A Pen by Felix De Montis on CodePen.
.battery | |
.battery | |
.battery | |
.battery | |
.battery | |
.battery | |
.battery | |
.battery |
html { font-size: 0.625em } | |
body { | |
background-color: #555557; | |
height: 4.2em; | |
margin: 0; | |
padding: 0; | |
position: absolute; | |
top: 50%; | |
left: 50%; | |
margin-left: -15.225em; | |
} | |
.battery { | |
height: 3.8em; | |
width: 2.2em; | |
background-color: transparent; | |
box-sizing: border-box; | |
border: .3em #ffffff solid; | |
float: left; | |
display: block; | |
margin-left: 2.4em; | |
} | |
.battery::before { | |
content: ""; | |
height: .4em; | |
width: 1em; | |
background-color: #ffffff; | |
position: absolute; | |
margin-top: -.7em; | |
margin-left: .3em; | |
} | |
.battery::after { | |
content: ""; | |
background-color: #ffffff; | |
width: 1.2em; | |
position: absolute; | |
margin-left: .2em; | |
} | |
.battery:nth-child(1)::after { | |
height: 2.8em; | |
margin-top: .2em; | |
background: | |
linear-gradient(113deg, | |
rgb(235, 106, 66) 0%, | |
rgb(235, 106, 66) 46%, | |
rgb(85, 85, 87) 46%, | |
rgb(85, 85, 87) 54%, | |
rgb(235, 106, 66) 54%, | |
rgb(235, 106, 66) 100%); | |
} | |
.battery:nth-child(2)::after { | |
height: .3em; | |
margin-top: 2.7em; | |
background-color: rgb(235, 106, 66); | |
} | |
.battery:nth-child(3)::after { | |
height: .6em; | |
margin-top: 2.4em; | |
} | |
.battery:nth-child(4)::after { | |
height: 1em; | |
margin-top: 2em; | |
} | |
.battery:nth-child(5)::after { | |
height: 1.6em; | |
margin-top: 1.4em; | |
} | |
.battery:nth-child(6)::after { | |
height: 1.9em; | |
margin-top: 1.1em; | |
} | |
.battery:nth-child(7)::after { | |
height: 2.5em; | |
margin-top: 0.5em; | |
} | |
.battery:nth-child(8)::after { | |
height: 2.8em; | |
margin-top: 0.2em; | |
} | |
.battery:first-child { margin-left: 0 } |