鼠标移向小图显示大图

代码简介:

CSS制作的图片查看特效,鼠标放上后出现放大的图片,带漂亮的边框修饰,还可以加入简短的图片说明。

代码内容:

View Code
<html>
<head>
<title>鼠标移向小图显示大图 - www.webdm.cn</title>
<style type="text/css">
.thumbnail
{
position
: relative;
z-index
: 0;
}

.thumbnail:hover
{
background-color
: transparent;
z-index
: 50;
}

.thumbnail span
{
position
: absolute;
background-color
: lightyellow;
padding
: 5px;
left
: -1000px;
border
: 1px dashed gray;
visibility
: hidden;
color
: black;
text-decoration
: none;
}

.thumbnail span img
{
border-width
: 0;
padding
: 2px;
}

.thumbnail:hover span
{
visibility
: visible;
top
: 0;
left
: 60px;
}
</style>
</head>
<body>
<class="thumbnail" href="#thumb"><img src="http://www.webdm.cn/images/wall3_s.jpg" border="0" target="_blank"/>
<span><img src="http://www.webdm.cn/images/wall3.jpg" border="0"><br>好美的景致啊~</span></a>
</body>
</html>
<br />
<p><href="http://www.webdm.cn">网页代码站</a> - 最专业的网页代码下载网站 - 致力为中国站长提供有质量的网页代码!</p>
代码来自:http://www.webdm.cn/webcode/7a901ae7-9a00-48b2-ac34-50cfaae2489c.html

 

 

posted @ 2011-08-23 10:24  网页代码站  阅读(583)  评论(4编辑  收藏  举报