首页 > 其他 > 详细

水波纹--转载

时间:2016-11-17 18:44:02      阅读:200      评论:0      收藏:0      [点我收藏+]

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
@keyframes turn{
from{transform: rotate(0deg);}
to{transform: rotate(360deg)}
}
.wave{
width:150px;
height: 150px;
border: 5px solid #000;
border-radius: 50%;
position: absolute;
top:100px;
left: 100px;
overflow: hidden;
z-index: 1;
line-height: 150px;
background: rgba(0,0,0,.6);
}
.turn{
width: 350px;
height: 350px;
position: absolute;
background: rgba(200,100,30,1);
border-radius:40%;
top:100%;
left:-100px;
animation: turn 5s linear infinite;
}
.tips{
width: 150px;
position: absolute;
font-size: 30px;
color: #fff;
text-align: center;
}
</style>
</head>
<body>
<div class="wave">
<div class="turn"></div>
<div class="tips">1%</div>
</div>
</body>
<script type="text/javascript" src="jquery-1.11.1.js"></script>
<script type="text/javascript">
var topNum = 100;
var timer = setInterval(function(){
$(".turn").css({"top":topNum+"%"});
topNum -= 0.005;
var text = parseInt(100 - topNum)+"%";
$(".tips").text(text);
if(topNum <= 0){
clearInterval(timer);
}
},1);
</script>
</html>

水波纹--转载

原文:http://www.cnblogs.com/queenie/p/6074705.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!