水平进度条

Phi*_*enn 0 jquery html5

在html和jQuery中,如何显示多个水平进度条?上课时我有个主意.学生对主题进行投票,投票时,进度条左右移动.如果您曾参与Adobe Connect的民意调查,那就是我正在考虑的那种外观.

它可以在html5中,因为我将是唯一一个显示结果的人(在课程的前面).

它不能在闪存中,因为我不太清楚闪存.

我只需要每15秒左右自动刷新一次页面.

pth*_*lin 5

如何在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放在:)