JSFiddle - React, Tailwind, and code Playground
by Marc Malignan
HTML
<div id="loader">
<div id="tube">
<div id="heat"></div>
</div>
<ul id="grads">
<li>100</li>
<li>80</li>
<li>60</li>
<li>40</li>
<li>20</li>
<li>0</li>
</ul>
</div>
CSS
@-webkit-keyframes heating {
0% { height:0; }
80% { height:100%; }
100% { height:100%; }
}
body {
text-align: center;
background: #aaa;
}
#loader {
position: relative;
display: inline-block;
}
#tube {
position: relative;
width:12px; height:300px;
background: white;
border-radius: 6px 6px 0 0;
border: 2px solid white;
border-bottom: 0;
box-sizing: border-box;
}
#tube:after {
content: '';
position: absolute;
top:99%; left:50%;
width:40px; height:40px;
margin-left: -20px;
background: red;
border-radius: 50%;
border: 2px solid white;
box-sizing: border-box;
}
#heat {
position: absolute;
right:0; bottom:0; left:0;
border-radius: 5px 5px 0 0;
background: red;
z-index: 2;
-webkit-animation: heating 5s linear infinite;
}
#grads {
position: absolute;
top:0px; right:100%;
list-style: none;
padding: 0;
margin: 0 5px 0 0;
text-align: right;
}
#grads li {
line-height: 20px;
margin-bottom: 36px;
font-size: 12px;
font-family: helvetica;
}