本文介绍了为什么jQuery Mobile的1.1-RC1(再次)用于加载图标为.gif?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

在1.0.1旋转的图标是用CSS旋转的PNG。这种平稳的出现在Android 2.x的我。

In 1.0.1 the spinner icon was a png that was rotated with CSS. This appeared smooth on Android 2.x for me.

在版本1.1-RC1他们已经从巴纽改变图标的​​.gif动画

In version 1.1-rc1 they have changed the icon from a .png to an animated .gif

在Android上的动画.gif文件奇怪的行为对我来说,对2.2.x的和2.3.x版本不稳定的速度,不要在2.1.x的工作

On Android animated .gifs behave oddly for me, with erratic speeds on 2.2.x and 2.3.x and don't work on 2.1.x

他们为什么要改变它从一个到另一个?它有什么优势不使用CSS转动这似乎是很多更清晰,更流畅的对我巴纽。

Why did they change it from the one to the other? Is there any advantage to not using CSS to rotate the .png which seemed to be a lot crisper and smoother for me.

有谁知道如何实现在1.1-RC1旧装载机?

Does anyone know how to implement the old loader in 1.1-rc1?

推荐答案

JQM可能已经改变了加载图标,因为它依赖于WebKit的动画。 GIF动画具有更多浏览器的支持。

JQM may have changed the loading icon because it relied on webkit animations. The animated gif has support for more browsers.

要实现PNG加载图标覆盖的.ui图标加载类。

To implement the png loading icon override the .ui-icon-loading class.

.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);}
}

这篇关于为什么jQuery Mobile的1.1-RC1(再次)用于加载图标为.gif?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 15:26