CSS3实现简单特效实例(1)

来源:互联网 发布:sql大于某个时间 编辑:程序博客网 时间:2024/06/05 04:03
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>biubiu</title>
<style>
*{margin:0;padding:0;}
.btn{width:200px; height:100px;margin:auto;border:1px solid red;text-align: center;position:absolute;overflow: hidden;z-index:1;background-color: yellow;left:0;right:0;bottom:0;top:0;border-radius:5%;}
.btn:before{content:""; width:2px; height:100%;position: absolute;left:50%;top:0;background: #fff;opacity: 0;z-index:-1;transform:skewX(45deg);transition: all 0.4s;}
a{text-decoration:none;line-height: 100px;color:black;}
.btn:hover a{color:red;}


.btn:hover:before{width:100%;opacity: 1;left:0;}




</style>
}
</head>
<body>
<div class="btn">
<a href="#">read more -></a>
</div>

</body>

</html>

原图:




图2:

原创粉丝点击