我想要獲得一個背景圖像來顯示鼠標懸停在三個圖像中的任何一個。這裏是一個jsFiddle:http://jsfiddle.net/cvh2013/gefKT/,誰能告訴我我做錯了嗎?此時,當您懸停三個圓形圖像中的任何一個時,背景圖像都不會顯示。CSS:背景圖像問題
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="UTF-8" />
<title>SVG Included with <object> tag</title>
<style>
.center {
text-align: center;
}
#images:hover {
background-image: url(http://ubuntuone.com/1SRrDB8i8cBtpm3Smxaz5r);
background-repeat: no-repeat;
}
</style>
</head>
<body>
<table style="width: 100%">
<tr>
<div id="images">
<td class="center"><object type="image/svg+xml"
data="http://ubuntuone.com/5b5ZUS86nHAffWiOirDwFr">
<img src="http://ubuntuone.com/12qOaTGCZYzQtqFJpaGbPV" alt="" />
</object></td>
<td class="center"><object type="image/svg+xml"
data="http://ubuntuone.com/7Ur09JXlGVvF2GhXFbLXlx">
<img src="http://ubuntuone.com/54AaqhQUU8npACF2vXzKFp" alt="" />
</object></td>
<td class="center"><object type="image/svg+xml"
data="http://ubuntuone.com/6tkHm9c2r1eH9PMB9Nr3Ux">
<img src="http://ubuntuone.com/4CXw05d1dsSf9VhAIPNZf6" alt="" />
</object></td>
</div>
</tr>
</table>
</body>
</html>
你不需要告訴它的圖像類型? – 2013-03-15 20:58:19
@JeffHawthorne文件擴展名僅僅適用於簡單的文件系統(和人類),如果網絡服務器使用正確的MIME類型進行響應,那麼瀏覽器將做正確的事情 – 2013-03-15 21:02:00
看看這個小提琴http://jsfiddle.net/gefKT/ 10/ – rzymek 2013-03-15 21:03:48