我在我的網頁中有兩個動畫.gif
圖像,但它們沒有在Firefox中顯示。它適用於IE,Safari和Chrome。我已閱讀其他帖子,但我找不到可行的解決方案。有人可以幫忙嗎?DIV圖像不顯示在Firefox中
這是網址: http://www.lokalbericht.unibe.ch
以下是代碼:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Lokalbericht - Hermann Burger</title>
<style type="text/css">
.text_body {
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
}
body {
background-color:#000000;
background-image:url(images/intro/background_paper.jpg);
background-position:center 50px;
background-repeat:no-repeat;
background-attachment:fixed;
}
div.soon {
content:url(images/intro/coming_soon.gif);
position: relative;
width:650px;
height:170px;
top:350px;
left:30%;
}
div.lokalbericht {
content:url(images/intro/animation.gif);
width:160px;
height:20px;
position: absolute;
top:300px;
left:45%;
}
</style>
</head>
<body>
<div class="soon"> </div>
<div class="lokalbericht"> </div>
'內容:網址(圖像/前奏/ animation.gif);' - 爲什麼不把它設置爲背景圖片,使用'背景:網址()' –
不能使用'content'除非它與僞元素 –
感謝Nick R.這是正確的解決方案 – user3760026