css 鼠标滑过显示隐藏内容

<!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>

转载于:https://www.cnblogs.com/wuliwuli/p/5134000.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值