我想要获得一个背景图像来显示鼠标悬停在三个图像中的任何一个。这里是一个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