感谢您的支持,我会继续努力的!
打开微信扫一扫,即可进行扫码打赏哦
点我查看本站打赏源码!
Powered by RUNCODEX.COM,学的不仅是技术,更是梦想!!!
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>文档标题</title>
</head>
<body>
<div class="box">
Demo
</div>
</body>
</html>
输入 JavaScript 代码……
xxxxxxxxxx
.box{
position:relative;
width:50px;
height:50px;
background-color:rgba(0,0,0,0.5);
padding:5px;
text-align:center;
line-height:50px;
color:#fff;
font-size:23px;
border-radius:12px;
animation:move 6s ease 10 alternate forwards;
}
@keyframes move{
0%{left:0px;top:0px}
25%{left:300px;top:0px}
50%{top:100px;left:300px}
75%{left:0px;top:100px}
100%{top:0px;left:0px}