如:<a href="#">
<img alt="" src="images/sp.jpg" />
</a>
这张图片作为一个超链接,我想把鼠标放上去时这个图片的边框颜色改变,怎样实现呢?那位好心的大人指点一下O(∩_∩)O~
不甚感激
设置“鼠标经过图像”效果,活用a标签就可以了。
<style type="text/css">
a.home {background:url(鼠标滑过之前的图片地址) no-repeat; width:100px; height:20px;
display:inline-block;_float:left;}
a.home:hover {background:url(鼠标滑过的图片地址) no-repeat;
</style>
<div>
<a href="http://www.baidu.com" class="home">首页</a>
</div>
这样就可以实现有链接的可以换图的效果