我正在使用CSS(下)。 loading64.gif在FF和IE中始終可見,但在chrome中不可見。我在colorbox裏使用'.loading'。我無法解決問題。GIF沒有顯示在鉻
HTML:
<center><div class="loading" id="loaderImg"><span class="waiting-info"></span></div></center>
CSS:
.loading {
background: url(resources/base/img/loading64.gif) no-repeat center center transparent;
background-color: #ffffff;
float: left;
height: 100%;
min-height: 333px;
width: 100% !important;
z-index: 444;
position: absolute;
opacity: 0.9;
left: 0;
top: 0;
}
你可以嘗試在'url'中使用引號嗎?這是可選的,但關於以下評論,似乎甚至是Chrome的新版本都有問題。參考:http://stackoverflow.com/questions/2168855/is-quoting-the-value-of-url-really-necessary(閱讀評論部分的「接受答案」) –
你是否從網絡服務器運行此或本地文件系統?由於安全限制,Chrome在從硬盤加載文件(以url:// ...開頭的網址)方面存在問題。假設gif在css中使用相對路徑,它將與站點url一起預先配置。如果該站點被加載爲file://,則可能會遇到問題。無論如何,在調試控制檯中必須存在相關錯誤,如果確實發生錯誤,也可以將其添加到帖子中。 –
它是一個動畫GIF? – putvande