码迷,mamicode.com
首页 > 其他好文 > 详细

鼠标经过图片时出现半透明文字特效

时间:2014-08-13 01:07:24      阅读:217      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   color   os   io   strong   ar   

bubuko.com,布布扣

鼠标经过图片时出现半透明文字的效果

以下是个很常见的图片显示特效,当鼠标经过图片时,图片上会浮动一个半透明的层,层内显示文字,同时图片的边框会变亮,效果很好。

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
<title>当鼠标经过图片时,出现半透明的文字</title>
<style type="text/css">
body{background:#333}
img{border:none}
.wrap{margin:10px;position:relative;}
.photo a{position:absolute;display:block;border:1px solid #999;padding:2px}
.photo a:hover{border:1px solid #fff;text-decoration:none}
.photo a span {display:none;cursor:hand;text-align:center;font:bold 12px/30px Verdana, Arial;}
.photo a:hover span{width:500px;margin:0 2px;background:#000;display:block;position:absolute;bottom:0;left:0;color:#fff;filter:alpha(opacity=60);-moz-opacity:0.6;opacity:0.6;}
</style>
</head>
<body>
<div class="wrap">
<div class="photo"><a href="#">
<img src="/***/***.jpg" border="0" /><span>you are a marvel!</span></a></div>
</div>
</body>
</html>

鼠标经过图片时出现半透明文字特效,布布扣,bubuko.com

鼠标经过图片时出现半透明文字特效

标签:style   blog   http   color   os   io   strong   ar   

原文地址:http://www.cnblogs.com/conbios/p/3909013.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!