电脑技术学习

用css实现图片替换

dn001

<style>
h2{font-size:14px; font-weight:bold; padding:10px 0; margin:5px 0; border-bottom:1px solid #ccc;};
.box2{}
.box2 img{display:block; padding:2px; border:0;};
.box2 a{color:#333; text-decoration:none;border:2px solid #FFF; float:left; cursor:hand;}
.box2 a span{display:none; color:#F00;}

.box2 a:hover{color:#999; border:2px solid; #333; }
.box2 a:hover span{display:inline; position:absolute;}

</style>
</head>

<body>
<h2>CSSヌミササヘシニャミァケ・/h2>
<div class="box2">
<a href="#"><span><img src="http://img.pc004.com/p/2009-05-09/20090509104712499.jpg" /></span><img src="http://img.pc004.com/p/2009-05-09/20090509104713149.jpg" /></a>
</div>

</body>