2012-03-30 11 views
4

在1.0.1中,微調器圖標是一個用CSS旋轉的png。這對我來說在Android 2.x上顯得順利。爲什麼jQuery Mobile 1.1-rc1使用.gif作爲加載圖標(再次)?

在版本1.1-RC1他們已經從巴紐改變圖標的​​.gif動畫

在Android上的動畫.gif文件奇怪的行爲對我來說,對2.2.x的和2.3.x版本和唐不穩定速度不能在2.1.x上工作

他們爲什麼要將它從一個改爲另一個?沒有任何優勢,不使用CSS來旋轉.png,這對我來說似乎更加清爽和平滑。

有誰知道如何在1.1-rc1中實現舊的loader?

回答

13

JQM可能已經更改了加載圖標,因爲它依賴於webkit動畫。動畫GIF支持更多瀏覽器。

要實現png加載圖標,請覆蓋.ui-icon-loading類。

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

感謝的伴侶真的很感激它 – 2012-03-30 11:11:28

+0

我注意到,以及有一天,它是完全玩我的頭。 – imaginethepoet 2012-03-30 15:49:37

相關問題