JSDM

HTML

 
1
    <div class="container">
2
        <div class="attack"></div>
3
        <div class="defense" data-before="Please" data-after="wait...">&nbsp;</div>
4
    </div>
!

CSS

xxxxxxxxxx
29
 
1
*{margin: 0;padding: 0;}
2
.container{position:relative;margin: 100px auto; width: 400px;height: 400px;border:1px solid #ccc;border-radius:10px;}
3
.attack{position:absolute;left: 50%;margin-left: -50px;width: 100px;height: 100px;-webkit-animation:go .9s linear infinite;}
4
.attack::before{content:'';position:absolute;width: 100%;height: 100%;-webkit-animation:spin 1.8s linear infinite;background-color:#37acf4}
5
.defense{position:relative;margin-top: 250px;color:#cfcfc5;font-size: 38px;font-family: Segoe UI;text-align: center;}
6
.defense::before{display: inline-block;content:attr(data-before);transform-origin:left bottom;-webkit-animation:txtLeft 0.9s linear infinite;}
7
.defense::after{display: inline-block;content:attr(data-after);transform-origin:right bottom;-webkit-animation:txtRight 0.9s linear infinite;}
8
@keyframes txtLeft{
9
  50%,85%{transform:rotate(0deg);}
10
  65%{transform:rotate(6deg);}
11
  70%{transform:rotate(-3deg);}
12
  75%{transform:rotate(2deg);}
13
}
14
@keyframes txtRight{
15
  50%,85%{transform:rotate(0deg);}
16
  65%{transform:rotate(-6deg);}
17
  70%{transform:rotate(3deg);}
18
  75%{transform:rotate(-2deg);}
19
}
20
@keyframes go{
21
  0%{transform:translateY(0px);}
22
  25%{transform:translateY(178px);}
23
  50%{transform:translateY(0px);}
24
  75%{width:50px;height:50px}
25
  100%{width:50px;height:50px}
26
}
27
@keyframes spin{
28
  100%{transform:rotate(-360deg);}
29
}
!
? ?
? ?
必须是有效的URL
+ 添加另一个资源

JS

x
 
1
!
必须是有效的URL
+ 添加另一个资源
Close

文件管理 点击文件查看URL

图片

  1. 暂无文件

CSS

  1. 暂无文件

JavaScript

  1. 暂无文件

其他

  1. 暂无文件
拖动文件到上面的区域或者:
加载中 ..................