鼠标经过 图片边框变色

css

2009-06-01 14:30

<style type="text/css">
.img a img{filter:alpha(opacity=50);opacity:0.5;border:#FFF 2px solid;}
.img a:hover img{filter:alpha(opacity=100);opacity:1;border:#F60 2px solid;}
</style>


<div class="img">
<a href="1.html">
<img src="http://himg.baidu.com/sys/portrait/item/f254c1c9c4fec8cbc3f1bbb6d3adc4fa2a04.jpg" border="0"></a>
</div>

正常状态

鼠标经过

--------------------------------------------------------------------------------------------------------------------------------

<style type="text/css">
#d img { border:#999 1px solid;}
#d img:hover { border: #F00 1px solid;}

#dd img { border: #F00 1px solid;}
#dd img:hover { border: #0F0 1px solid;}
</style>

<div id="d">
<img src="reg.jpg" width="110" height="75" />
<img src="reg.jpg" width="110" height="75" />
<img src="reg.jpg" width="110" height="75" />
</div>

<div id="dd">
<img src="reg.jpg" width="110" height="75" />
<img src="reg.jpg" width="110" height="75" />
<img src="reg.jpg" width="110" height="75" />
</div>