如何在div中使用div?
HTML/CSS:
<div id="progress" style="width:200px; height:5px; border:1px solid black">
<div style="background:green; height:inherit; width:0%">
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
jQuery的:
$(document.ready(function() {
window.setInterval(function() {
$('#progress div').css('width', your_way_of_measuring_percentage + '%');
}, 15000);
});
Run Code Online (Sandbox Code Playgroud)
尚未测试此代码,因此将社区wiki放在:)