我有這樣的代碼......填寫x秒進度條
HTML
<div class="progress-bar">
<span class="progress-bar-fill" style="width: 30%"></span>
</div>
CSS
.progress-bar {
width: calc(100% - 6px);
height: 5px;
background: #e0e0e0;
padding: 3px;
border-radius: 3px;
box-shadow: inset 0 1px 3px rgba(0, 0, 0, .2);
}
.progress-bar-fill {
display: block;
height: 5px;
background: #659cef;
border-radius: 3px;
transition: width 250ms ease-in-out;
}
它應該顯示滑塊的進度和當前圖像多久將持續到下一個畫面....
如果圖像每隔5秒更改一次,那麼我希望酒吧填滿ou t在5秒內100%...我在javascript和jQuery中總是noob ...
使用'setInterval' – Tushar