【发布时间】:2016-12-04 19:06:59
【问题描述】:
所以我只使用 css 为我的文件上传表单上的剥离进度条设置动画。 文件上传成功,上传完成后,(进度条达到100%)动画不会停止!条带继续移动,就好像文件仍在上传一样。谁能告诉我如何解决这个小问题?
我的 CSS 代码
.ajax-file-upload-bar {
background-color: #0ba1b5;
width: 0;
height: 30px;
border-radius: 3px;
color:#FFFFFF;
font-family: calibri;
background-image: linear-gradient(
-45deg,
rgba(255,255,255,0.25) 25%,
transparent 25%,
transparent 50%,
rgba(255,255,255,0.25) 50%,
rgba(255,255,255,0.25) 75%,
transparent 75%,
transparent
);
background-size: 40px 40px;
display: block;
height: 100%;
width: 100%;
animation: anim_stripes 1s linear infinite;
-webkit-animation: anim_stripes 1s linear infinite;
}
@keyframes anim_stripes {
from {
background-position: 0 0;
}
to {
background-position: 40px 40px;
}
}
【问题讨论】:
-
你需要 JavaScript。
标签: html css forms animation upload