码迷,mamicode.com
首页 > Web开发 > 详细

css 鼠标滑过显示隐藏内容

时间:2016-01-15 20:08:29      阅读:188      评论:0      收藏:0      [点我收藏+]

标签:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>css鼠标滑过隐藏文字</title>
<style>
.divc{
width:400px;
height:400px;
background:#99CC66;
margin:0px auto;
margin-top:200px;
position:relative;
}
.divc-up{
background:#FFCCCC;
background-size:100% 100%;
width:100%;
height:100%;
opacity:0.3;
position:absolute;
top:0px;
left:0px;
-ms-filter: "progid: DXImageTransform.Microsoft.Alpha(Opacity=0)";
filter: alpha(opacity=0);
opacity: 0;
-webkit-transition: all 0.1s ease-in 0.1s;
-moz-transition: all 0.1s ease-in 0.1s;
-o-transition: all 0.1s ease-in 0.1s;
-ms-transition: all 0.1s ease-in 0.1s;
transition: all 0.1s ease-in 0.1s;
}
.divc:hover .divc-up{
filter: alpha(opacity=100);
opacity: 0.8;
-webkit-transition-delay: 0s;
-moz-transition-delay: 0s;
-o-transition-delay: 0s;
-ms-transition-delay: 0s;
transition-delay: 0s;
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#7f000000,endColorstr=#7f000000);
}
</style>

</head>

<body>
<div class="divc">
<div class="divc-up"></div>
</div>
</body>
</html>

css 鼠标滑过显示隐藏内容

标签:

原文地址:http://www.cnblogs.com/wuliwuli/p/5134000.html

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