JQM可能已经更改了加载图标,因为它依赖于webkit动画。动画gif支持更多浏览器。
1.0.1中的微调器图标是一个使用CSS旋转的png。这在安卓2.x上对我来说似乎很顺利。
在1.1-rc1版本中,他们将图标从.png更改为动画.gif
在安卓系统上,动画.gif的表现对我来说很奇怪,在2.2.x和2.3.x上速度不稳定,在2.1.x 上不起作用
他们为什么要把它从一个改成另一个?不使用CSS来旋转.png有什么好处吗?这对我来说似乎更清晰、更流畅。
有人知道如何在1.1-rc1中实现旧的加载器吗?
要实现png加载图标,请覆盖.ui图标加载类。
.ui-icon-loading {
background: url(http://code.jquery.com/mobile/1.1.0-rc.1/images/ajax-loader.png);
background-size: 46px 46px;
width:46px;
height:46px;
-webkit-transform: rotate(360deg);
-webkit-animation-name: spin;
-webkit-animation-duration: 1s;
-webkit-animation-iteration-count: infinite;
-webkit-animation-timing-function: linear;
}
@-webkit-keyframes spin {
from {-webkit-transform: rotate(0deg);}
to {-webkit-transform: rotate(360deg);}
}