我有以下代码:更改div`s背景图像时,将鼠标悬停在图像
<!DOCTYPE html> <html >
<head>
<style type="text/css">
.imgBox {background: url(lock75.png) no-repeat; }
.imgBox:hover {background: url(lock75light.png) no-repeat; }
</style>
</head>
<body>
<div style="width:200px; height:200px; border:1px solid;" class="imgBox"> </div>
</body>
</html>
我的图片75x75和出现的问题是,当我将鼠标悬停在边界上的图像的变化,我想,当悬停在图像上来改变图像。
注:我需要一个类似于这个html的结构。
编辑
我忘了提,我需要我却没有对图片有一定的空间的其他的div以上是集中式的图片。
感谢
减少'div'宽度960x75像素。 –
与哪一个相似? –
不可能我在div中除了图像以外还有其他内容。 – MartinZPetrov