需要用到JS,代码如下(直接复制到你新建的html文件中):
可以使用Progress元素配合js,也可以自己设计用JS动态控制
.texs{width: 300px;height: 15px;background: #ccc;border-radius: 10px;overflow: hidden;}
.texs span{display: block;height: 15px;background: #f00; animation: myfirst 5s;-webkit-animation: myfirst 5s;}
@keyframes myfirst
{
from {width: 0;}
to {width: 100%;}
}
@-webkit-keyframes
{
from {width: 0;}
to {width: 100%;}
}
是什么样的进度条?