2
我後期加載jQuery,並導致在Opera(和Opera獨自)的CSS錯誤。我創建了一個JSFiddle來演示。與Opera加載jQuery
有一些CSS是樣式像HTML和BODY標籤:
html {
background: #6B9AB6;
}
body {
background: white;
max-width: 10em;
}
然後張貼負荷的jQuery(使用演示目的簡單setTimeout
):
setTimeout(function(){
var script_tag = document.createElement('script');
script_tag.src = 'http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js';
var script_sib = document.getElementsByTagName('script')[0];
script_sib.parentNode.insertBefore(script_tag, script_sib);
}, 2000);
導致正確的CSS顯示,然後閃爍到一個無風格的HTML標記。使用Opera的DragonFly並更改background-attachment
或background-origin
可以動態修復此問題。如果以編程方式執行此操作,情況也不一樣。
有沒有辦法使Opera與後裝jQuery的行爲?如果您有任何想法,請隨時更新JSFiddle。
我不知道這個答案,但有一些類似的IE8 - http://stackoverflow.com/questions/6149820/weird-ie8-layout-glitch,但這似乎並不相關這裏。 – thirtydot
你試過'$('