How do I make it when I open the site with this code, it already "fills" this bar and remains filled, without having to keep the mouse over?
div {
width: 50px;
height: 50px;
background: red;
-webkit-transform: width 2s; /* Safari */
transition: width 2s;
border-radius: 100px;
}
/* For Safari 3.1 to 6.0 */
#div1 {-webkit-animation-timing-function: linear;}
#div2 {-webkit-transform-timing-function: ease;}
#div3 {-webkit-transform-timing-function: ease-in;}
#div4 {-webkit-transform-timing-function: ease-out;}
#div5 {-webkit-transform-timing-function: ease-in-out;}
/* Standard syntax */
#div1 {transform-timing-function: linear;}
#div2 {transform-timing-function: ease;}
#div3 {transform-timing-function: ease-in;}
#div4 {transform-timing-function: ease-out;}
#div5 {transform-timing-function: ease-in-out;}
div:hover {
width: 50%;
}
<body>
<p><b>Note:</b> This example does not work in Internet Explorer 9 and earlier versions.</p>
<div id="div1"></div><br>
<div id="div2"></div><br>
<div id="div3"></div><br>
<div id="div4"></div><br>
<div id="div5"></div><br>
<p>Hover over the div elements above, to see the different speed curves.</p>
</body>