我设计了一个类似的进度条
<style>
#progress-holder{width:400px;height:20px;background:grey}
#progress{width:0;height:100%;background:black}
</style>
<div id="progress-holder">
<div id="progress"></div>
</div>
<script>
var progress = document.getElementById('progress');
function updateValue(perc) {
progress.style.width = perc+'%';
}
updateValue(40);
</script>
它很简单,通过 updateValue() 函数我可以更改进度值 ...现在我想向此进度条添加一条斜线,例如
你知道类似的事情吗?或者现有的脚本?谢谢:)
最佳答案
关于javascript - 如何向进度条添加条纹或斜线?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32920450/