【发布时间】:2019-10-23 02:06:37
【问题描述】:
在整个页面加载时;黄色圆圈需要从距离中心的 1 条细线开始,并将“形成/填充”整个圆圈。
我使用了 jPreloader。我不确定如何从中心开始加载徽标。目前,高度随着页面加载而动画化。
将高度分配给 div 的 Javascript。
$(jBar).stop().animate({
height: per + '%'
}, 500, 'linear');
标志所在的CSS:
#jpreBar {
border-radius:0%;
-moz-border-radius:0%;
-webkit-border-radius:0%;
background: url(../images/logo.jpg) left top no-repeat;
animation: progress 2s linear infinite;
-moz-animation: progress 2s linear infinite;
-webkit-animation: progress 2s linear infinite;
-ms-animation: progress 2s linear infinite;
-o-animation: progress 2s linear infinite;
}
动画需要是这样的,从左到右:
【问题讨论】:
-
你能不能只使用
center center而不是left top来定位你的图像? -
这会使徽标也移动,请检查链接。标志是从上到下的,它更好,但仍然不像客户想要的那样。
-
只是一些建议,你应该声明 -webkit-,-moz-,-ms- 和 -o-animation 以及不带前缀的动画,顺序很重要!
标签: javascript jquery html css jpreloader