iphone开机动画

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
body{
background: black; font:40px/200px '微软雅黑' ;text-align: center;
}
h1{display: inline-block; color: rgba(255,255,2555,0.3);background:-webkit-linear-gradient(-40deg,rgba(255,255,255,0) 100px,rgba(255,255,255,1) 180px,rgba(255,255,255,0) 240px,rgba(255,255,255,0) 300px) -300px 0 no-repeat; -webkit-background-clip: text}
</style>
</head>
<body>
<h1 > I think i’m tired</h1>
<script type="text/javascript">
var oH1=document.getElementsByTagName("h1")[0];
var timer=null;
var Lefter=-300;

function tomove(){
timer=setInterval(function () {

Lefter+=10;
if (Lefter==1000) {
Lefter=-300;
clearInterval(timer)
}
oH1.style.backgroundPosition=Lefter+'px 0px'
},20);
}
tomove();

</script>

</body>
</html>

原文地址:https://www.cnblogs.com/zk666/p/5594343.html