我正在使用jQuery animate()函數來顯示一個小文本變得越來越大,直到它消失。jQuery animate在IE和Firefox都很慢
我有jQuery的代碼在這裏:
function Gain() {
/* Using multiple unit types within one animation. */
$("#block").animate({
width: "80%",
opacity: 0.0,
marginLeft: "2.6in",
fontSize: "15em",
borderWidth: "10px"
}, 2000, function() {
$("#block").removeAttr("style");
$("#block").html("");
$("#block").css("color", "White");
$("#block").css("position", "absolute");
$("#block").css("z-index", "-5");
});
}
我用火的功能代碼:
string script = "$('#block').html('Yes!<br/>" + xpReward.ToString() + "xp!');";
ScriptManager.RegisterStartupScript(ButtonListUpdate, typeof(string), "startup",
"xpGain(); " + script, true);
此代碼運行每次我選擇一個選項RadioButtonList(ASP.NET)。
現在,我有這個問題:
- 瀏覽器 - 作品真的很好
- 野生動物園 - 作品真的很好
- iPhone瀏覽器 - 工程確定
- 的Internet Explorer - 可怕
- Firefox - 有時很棒,其他時間很可怕
我想忽略Internet Explorer,但由於它們有很大的市場份額,我必須處理這個問題。
您可以嘗試動畫自己
- 轉到http://www.GameLearner.com
- 單擊較大的 「現在播放」 按鈕
- 點擊 「播放的時候了」
- 回答問題正確。第一個問題可能需要〜5-10s
所以我的問題是....
如何使在Internet Explorer這項工作?現在這太可怕了。我不指望它工作真的很好,但只是「可玩」將是非常可怕的...
非常感謝! 拉爾斯
在IE 9上正常工作。 – Pradeep