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

用css3过滤做遮罩效果

时间:2017-05-25 18:22:25      阅读:178      评论:0      收藏:0      [点我收藏+]

标签:osi   mask   body   pos   char   line   abs   har   htm   

<!DOCTYPE html>
<html ng-app="myApp" ng-controller="myController">
<head lang="en">
<meta charset="UTF-8">
<title>CSS3做遮罩</title>
<style>
.all{
width:100%;
height:500px;
background:red;
position: relative;
}
.mask{
width:100%;
height:0;
background:rgba(0,0,0,.5);
position:absolute;
transition: height 1s linear 1s;
}
.all:hover .mask{
height:500px;
display: block;
}
</style>
</head>
<body>
<div class="all">
<div class="mask"></div>
</div>
</body>
</html>

用css3过滤做遮罩效果

标签:osi   mask   body   pos   char   line   abs   har   htm   

原文地址:http://www.cnblogs.com/zhangyy520/p/6905184.html

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