用css实现图片替换
2008-08-20 19:28:13 来源:WEB开发网核心提示:<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;
<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://tech.cncms.com/tech/UploadPic/2010910/2010910192813697.jpg" /></span><img src="http://tech.cncms.com/tech/UploadPic/2010910/2010910192814892.jpg" /></a>
</div>
</body>
更多精彩
赞助商链接