本文主要介绍了CSS3中Animation实现简单的手指点击动画的示例,分享给大家,具体如下:
效果图
本文主要介绍了CSS3中Animation实现简单的手指点击动画的示例,分享给大家,具体如下:
效果图
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<title>CSS3--通过Animation实现简单的手指点击动画</title>
<style>
.wrapper{position:relative;overflow:hidden;width:500px;height:500px;margin:0 auto;background-color:black}
.circle{position:absolute;left:50%;top:50%;margin:-70px 0 0 -46px;
background: url("./circle.png") center center no-repeat;
width:62px;height:62px;animation:circleHide 1s ease infinite both}
.finger{background:url("./finger.png") center center no-repeat;width:100px;height:140px;margin:170px auto;animation:fingerHandle 1s ease infinite both}
@keyframes fingerHandle{
0%{transform:none}
70%{transform:scale3d(.8,.8,.8)}
100%{transform:none}
}
@keyframes circleHide{
0%{opacity:0;transform:scale3d(0,0,0)}
70%{opacity:1;transform:scale3d(1.2,1.2,1.2)}
100%{opacity:0;transform:scale3d(0,0,0)}
}
</style>
</head>
<body>
<div class="wrapper">
<div class="circle"></div>
<div class="finger"></div>
</div>
</body>
</html>上一篇:详解overflow:hidden的作用(溢出隐藏、清除浮动、解决外边距塌陷)
栏 目:CSS
本文标题:CSS3中Animation实现简单的手指点击动画的示例
本文地址:https://www.fushidao.cc/wangyezhizuo/231.html


申明:本站所有的文章、图片、评论等,均由网友发表或上传并维护或收集自网络,属个人行为,与本站立场无关。
如果侵犯了您的权利,请与我们联系,我们将在24小时内进行处理、任何非本站因素导致的法律后果,本站均不负任何责任。
联系QQ:66551466 | 邮箱:66551466@qq.com
Copyright © 2018-2025 科站长 版权所有鄂ICP备2024089280号