从前css3还没出来的时候,用jquery的delay方法可以串起一个一个独立的动画片段。

那么在不使用jquery的平台上,如何借助css3来完成一些列动作呢?

有高人做了一个动感十足的人物动画:

http://www.html5tricks.com/demo/css3-shake-head-animation/index.html

其中head整体进行了形变进入视野以后,稍作停留,开始随“音符”摆动。。

精确的组件、动画轨迹设计自然是大牛思维所到之处,而我这等平庸之辈只要学到语法上的规则,就够用了。

用浏览器审查元素:

.head {
width: 196px;
height: 260px;
border-radius: 50px;
background: #FFE4BE;
position: absolute;
top: 50%;
left: 50%;
margin-top: -206px;
margin-left: -98px;
animation: grow 0.7s 0.4s 1 ease;
-webkit-animation: grow 0.7s 0.4s 1 ease , music-move 1s 3.3s infinite alternate ease-in-out;
transform-origin: bottom;
-webkit-transform-origin: bottom;
}

可以看到 -webkit-animation 中是有逗号链接了两组动作的,即是前文所述的delay

而music-move 想必是一个关键帧吧,在developer tools中是不容易察觉的,要看原始代码:

body, html{
width:100%;
height:100%;
margin:;
display: table;
text-align: center;
} .wrapper{
margin-top:100px;
vertical-align: middle;
position: relative;
}
.background-circle{
width: 400px;
height: 400px;
border-radius: 100%;
overflow: hidden;
margin: 0 auto;
background: #95B3BF;
position: relative;
-webkit-mask-image: -webkit-radial-gradient(#BADA55, #BADA55);
-moz-mask-image: -webkit-radial-gradient(#BADA55, #BADA55);
-o-mask-image: -webkit-radial-gradient(#BADA55, #BADA55);
-ms-mask-image: -webkit-radial-gradient(#BADA55, #BADA55);
animation:grow 0.7s 1 ease;
-webkit-animation:grow 0.7s 1 ease;
transform-origin: center;
}
.border-circle{
width: 399px;
height: 399px;
border-radius: 100%;
position: absolute;
left: 50%;
top: 50%;
margin-left: -220px;
margin-top: -220px;
border: 10px solid #FCB040;
-webkit-transform: scale(0);
transform: scale(0);
-webkit-transform-origin: center;
transform-origin: center;
}
.border-circle#one{
animation:border-pulse 1s 3.1s 1 ease;
animation-fill-mode: forwards;
-webkit-animation:border-pulse 1s 3.1s 1 ease;
-webkit-animation-fill-mode: forwards;
}
.border-circle#two{
animation:border-pulse 1s 3.3s 1 ease;
animation-fill-mode: forwards;
-webkit-animation:border-pulse 1s 3.3s 1 ease;
-webkit-animation-fill-mode: forwards;
} .body{
width: 285px;
height: 600px;
margin: 0 auto;
background: #222;
border-radius: 100px;
position: relative;
top: 200px;
animation:body-enter 0.7s 0.2s 1 ease;
animation-fill-mode: forwards;
-webkit-animation:body-enter 0.7s 0.2s 1 ease;
-webkit-animation-fill-mode: forwards;
} .head{
width: 196px;
height: 260px;
border-radius: 50px;
background: #FFE4BE;
position: absolute;
top: 50%;
left: 50%;
margin-top: -210px;
margin-left: -98px;
animation:grow 0.7s 0.4s 1 ease, music-move 1s 3.3s infinite alternate ease-in-out;
-webkit-animation:grow 0.7s 0.4s 1 ease, music-move 1s 3.3s infinite alternate ease-in-out;
/*
animation:grow 0.7s 0.4s 1 ease;
-webkit-animation:grow 0.7s 0.4s 1 ease;
*/
transform-origin: bottom;
-webkit-transform-origin: bottom;
} .hair-main{
width:220px;
height: 0px;
background: #E7AB57;
border-radius: 54px 54px 0px 0px;
margin-left: -12px;
margin-top: -10px;
animation:hair-anim 0.7s 0.9s 1 ease;
animation-fill-mode: forwards;
-webkit-animation:hair-anim 0.7s 0.9s 1 ease;
-webkit-animation-fill-mode: forwards;
position: relative;
z-index:;
} .hair-top{
width: 128px;
height: 70px;
opacity:;
border-top-right-radius: 30px;
background: #E7AB57;
position: relative;
top: -17px;
left: 50%;
transform: translateX(-64px);
-webkit-transform: translateX(-64px);
transform-origin: right;
-webkit-transform-origin: right;
animation:hair-top-anim 0.7s 1s 1 ease;
animation:hair-top-anim 0.7s 1s 1 ease;
animation-fill-mode: forwards;
-webkit-animation-fill-mode: forwards;
} .hair-bottom{
width: 54px;
height: 50px;
opacity:;
border-bottom-left-radius: 25px;
background: #E7AB57;
position: relative;
top: -20px;
left: 50%;
transform: translateX(-27px);
-webkit-transform: translateX(-27px);
transform-origin: left;
-webkit-transform-origin: left;
animation:hair-bottom-anim 0.7s 1.4s 1 ease;
animation:hair-bottom-anim 0.7s 1.4s 1 ease;
animation-fill-mode: forwards;
-webkit-animation-fill-mode: forwards;
} .sideburn{
width: 8px;
height: 25px;
background: #E7AB57;
position: absolute;
bottom: -25px;
opacity:;
animation:sideburn-anim 0.7s 0.9s 1 ease;
animation-fill-mode: forwards;
-webkit-animation:sideburn-anim 0.7s 0.9s 1 ease;
-webkit-animation-fill-mode: forwards;
} .sideburn#left{
left: 12px;
} .sideburn#right{
right: 12px;
} .face{
width: 180px;
height: 0px;
border-radius: 48px 48px 0 0;
background: #FFE4BE;
position: absolute;
top: 40px;
left: 8px;
animation:hair-anim 0.1s 0.8s 1 linear;
animation-fill-mode: forwards;
-webkit-animation:hair-anim 0.1s 0.8s 1 linear;
-webkit-animation-fill-mode: forwards;
z-index:;
}
.nose{
width: 20px;
height: 45px;
opacity:;
background: #FFE4BE;
border-top-left-radius: 20px;
position: absolute;
left: 50%;
top: 80px;
margin-left:-20px;
animation:shadow-anim 0.7s 3s 1 ease;
animation-fill-mode: forwards;
-webkit-animation:shadow-anim 0.7s 3s 1 ease;
-webkit-animation-fill-mode: forwards;
opacity:;
z-index:;
}
.ear{
width: 24px;
height: 35px;
background: #FFE4BE;
border-radius: 12px;
position: absolute;
top: 116px;
animation:grow 0.7s 1.3s 1 ease;
animation-fill-mode: forwards;
-webkit-animation:grow 0.7s 1.3s 1 ease;
-webkit-animation-fill-mode: forwards;
-webkit-transform: scale(0);
transform: scale(0);
}
.mouth{
width: 66px;
height: 33px;
border-radius: 0 0 33px 33px;
background: white;
position: absolute;
top: 150px;
left: 50%;
margin-left: -33px;
animation:grow 0.7s 2.6s 1 ease;
animation-fill-mode: forwards;
-webkit-animation:grow 0.7s 2.6s 1 ease;
-webkit-animation-fill-mode: forwards;
-webkit-transform: scale(0);
transform: scale(0);
}
.ear#left{
left: -12px;
}
.ear#right{
right: -12px;
}
.eye-shadow{
width:30px;
height: 15px;
border-radius: 0 0 15px 15px;
background:rgba(149,36,0,0.1);
position: absolute;
top: 70px;
animation:grow 0.7s 2s 1 ease;
animation-fill-mode: forwards;
-webkit-animation:grow 0.7s 2s 1 ease;
-webkit-animation-fill-mode: forwards;
-webkit-transform: scale(0);
transform: scale(0);
}
.eye-shadow#left{
left: 35px;
z-index:;
}
.eye-shadow#right{
right: 35px;
}
.eyebrow{
width: 40px;
height: 10px;
background: #E7AB57;
position: absolute;
top: -35px;
left: 50%;
margin-left: -20px;
opacity:;
-webkit-backface-visibility: hidden;
}
.eye-shadow#left .eyebrow{
animation:eyebrow-anim-left 0.7s 2.2s 1 ease;
animation-fill-mode: forwards;
-webkit-animation:eyebrow-anim-left 0.7s 2.2s 1 ease;
-webkit-animation-fill-mode: forwards;
}
.eye-shadow#right .eyebrow{
animation:eyebrow-anim-right 0.7s 2.2s 1 ease, eyebrow-raise 2s 6.6s infinite alternate ease-in-out;
animation-fill-mode: forwards;
-webkit-animation:eyebrow-anim-right 0.7s 2.2s 1 ease, eyebrow-raise 2s 6.6s infinite alternate ease-in-out;
-webkit-animation-fill-mode: forwards;
}
.eye{
width: 20px;
height: 28px;
border-radius: 10px;
background: #334C68;
position: absolute;
top: -18px;
left: 50%;
margin-left: -10px;
animation:grow 0.7s 2.2s 1 ease, eye-blink 4s 4.4s infinite linear;
animation-fill-mode: forwards;
-webkit-animation:grow 0.7s 2.2s 1 ease, eye-blink 4s 4.4s infinite linear;
-webkit-animation-fill-mode: forwards;
-webkit-transform: scale(0);
transform: scale(0);
-webkit-transform-origin: bottom;
transform-origin: bottom; }
.shadow-wrapper{
width: 98px;
height: 260px;
position: absolute;
left: -8px;
bottom: -84px;
z-index:;
overflow: hidden;
}
.shadow{
width: 98px;
height: 260px;
border-radius: 50px;
background: rgba(149,36,0,0.1);
position: absolute;
z-index:;
opacity:;
animation:shadow-anim 1s 2.8s 1 ease;
animation-fill-mode: forwards;
-webkit-animation:shadow-anim 1s 2.8s 1 ease;
-webkit-animation-fill-mode: forwards;
}
.triangle-light{
width: 400px;
height: 600px;
background: #FFFFFF;
opacity: 0.2;
position: absolute;
right: -65%;
animation: triangle-light-anim 1s 2.8s 1 ease;
animation-fill-mode: forwards;
-webkit-animation: triangle-light-anim 1s 2.8s 1 ease;
-webkit-animation-fill-mode: forwards;
-webkit-transform: translate(200px,0px);
transform: translate(200px,0px);
}
.triangle-dark{
width: 400px;
height: 600px;
background: #000000;
opacity: 0.2;
position: absolute;
left: -60%;
top: 30%;
animation: triangle-dark-anim 1s 3s 1 ease;
animation-fill-mode: forwards;
-webkit-animation: triangle-dark-anim 1s 3s 1 ease;
-webkit-animation-fill-mode: forwards;
-webkit-transform: translate(-200px,0px);
transform: translate(-200px,0px);
}
.music-note{
position: absolute;
font-size: 150px;
color: #FCB040;
width: 1px;
left: 50%;
opacity:;
}
.music-note#one{
margin-left: -250px;
top: 50%;
animation: note-anim 2s 3.5s infinite ease;
animation-fill-mode: forwards;
-webkit-animation: note-anim 2s 3.5s infinite ease;
-webkit-animation-fill-mode: forwards;
}
.music-note#two{
margin-left: 150px;
top: 30%;
animation: note-anim 2s 4.3s infinite ease;
animation-fill-mode: forwards;
-webkit-animation: note-anim 2s 4.3s infinite ease;
-webkit-animation-fill-mode: forwards;
}
.shirt-text{
font-family: 'Montserrat', sans-serif;
font-weight:;
color: white;
position: relative;
top: -300px;
font-size: 50px;
display: inline-block;
-webkit-text-stroke: 2px;
-webkit-transform: translate(0px,100px);
transform: translate(0px,100px);
animation-fill-mode: forwards !important;
-webkit-animation-fill-mode: forwards !important;
}
.shirt-text:nth-of-type(1){
animation: text-anim 0.7s 3s 1 ease;
-webkit-animation: text-anim 0.7s 3s 1 ease;
}
.shirt-text:nth-of-type(2){
color: #EF4136;
animation: text-anim 0.7s 3.1s 1 ease;
-webkit-animation: text-anim 0.7s 3.1s 1 ease;
}
.shirt-text:nth-of-type(3){
animation: text-anim 0.7s 3.2s 1 ease;
-webkit-animation: text-anim 0.7s 3.2s 1 ease;
}
.shirt-text:nth-of-type(4){
animation: text-anim 0.7s 3.3s 1 ease;
-webkit-animation: text-anim 0.7s 3.3s 1 ease;
}
.shirt-text:nth-of-type(5){
animation: text-anim 0.7s 3.4s 1 ease;
-webkit-animation: text-anim 0.7s 3.4s 1 ease;
} @keyframes grow
{
0% {
-webkit-transform: scale(0);
transform: scale(0);
}
60% {
-webkit-transform: scale(1.15);
transform: scale(1.15);
}
80% {
-webkit-transform: scale(0.95);
transform: scale(0.95);
}
100% {
-webkit-transform: scale(1);
transform: scale(1);
}
} @-webkit-keyframes grow /* Safari and Chrome */
{
0% {
-webkit-transform: scale(0);
transform: scale(0);
}
60% {
-webkit-transform: scale(1.15);
transform: scale(1.15);
}
80% {
-webkit-transform: scale(0.95);
transform: scale(0.95);
}
100% {
-webkit-transform: scale(1);
transform: scale(1);
}
} @keyframes body-enter
{
0% {
-webkit-transform: translateY(200px);
transform: translateY(200px);
}
60% {
-webkit-transform: translateY(-20px);
transform: translateY(-20px);
}
80% {
-webkit-transform: translateY(30px);
transform: translateY(30px);
}
100% {
-webkit-transform: translateY(0px);
transform: translateY(0px);
}
} @-webkit-keyframes body-enter /* Safari and Chrome */
{
0% {
-webkit-transform: translateY(200px);
transform: translateY(200px);
}
60% {
-webkit-transform: translateY(-20px);
transform: translateY(-20px);
}
80% {
-webkit-transform: translateY(30px);
transform: translateY(30px);
}
100% {
-webkit-transform: translateY(0px);
transform: translateY(0px);
}
} @keyframes hair-anim
{
0% {
height:0px;
-webkit-transform: translateY(137px);
transform: translateY(137px);
}
100% {
height: 137px;
-webkit-transform: translateY(0px);
transform: translateY(0px);
}
} @-webkit-keyframes hair-anim /* Safari and Chrome */
{
0% {
height:0px;
-webkit-transform: translateY(137px);
transform: translateY(137px);
}
100% {
height: 137px;
-webkit-transform: translateY(0px);
transform: translateY(0px);
}
} @keyframes sideburn-anim
{
0% {
opacity:;
-webkit-transform: translateY(-25px);
transform: translateY(-25px);
}
100% {
opacity:;
-webkit-transform: translateY(0px);
transform: translateY(0px);
}
} @-webkit-keyframes sideburn-anim /* Safari and Chrome */
{
0% {
opacity:;
-webkit-transform: translateY(-25px);
transform: translateY(-25px);
}
100% {
opacity:;
-webkit-transform: translateY(0px);
transform: translateY(0px);
}
} @keyframes hair-top-anim
{
0% {
opacity:;
-webkit-transform:translate(-64px, 30px);
transform:translate(-64px, 30px);
}
60% {
opacity:;
-webkit-transform: rotate(0deg) translate(-64px, 30px);
transform: rotate(0deg) translate(-64px, 30px);
}
80% {
opacity:;
-webkit-transform: rotate(10deg) translate(-64px, -5px);
transform: rotate(10deg) translate(-64px, -5px);
}
100% {
opacity:;
-webkit-transform: rotate(0deg) translate(-64px, 0px);
transform: rotate(0deg) translate(-64px, 0px);
}
} @-webkit-keyframes hair-top-anim /* Safari and Chrome */
{
0% {
opacity:;
-webkit-transform:translate(-64px, 30px);
transform:translate(-64px, 30px);
}
60% {
opacity:;
-webkit-transform: rotate(0deg) translate(-64px, 30px);
transform: rotate(0deg) translate(-64px, 30px);
}
80% {
opacity:;
-webkit-transform: rotate(10deg) translate(-64px, -5px);
transform: rotate(10deg) translate(-64px, -5px);
}
100% {
opacity:;
-webkit-transform: rotate(0deg) translate(-64px, 0px);
transform: rotate(0deg) translate(-64px, 0px);
}
} @keyframes hair-bottom-anim
{
0% {
opacity:;
-webkit-transform:translate(-27px, -40px);
transform:translate(-27px, -40px);
}
60% {
opacity:;
-webkit-transform: rotate(0deg) translate(-27px, -40px);
transform: rotate(0deg) translate(-27px, -40px);
}
80% {
opacity:;
-webkit-transform: rotate(10deg) translate(-27px, 5px);
transform: rotate(10deg) translate(-27px, 5px);
}
100% {
opacity:;
-webkit-transform: rotate(0deg) translate(-27px, 0px);
transform: rotate(0deg) translate(-27px, 0px);
}
} @-webkit-keyframes hair-bottom-anim /* Safari and Chrome */
{
0% {
opacity:;
-webkit-transform:translate(-27px, -40px);
transform:translate(-27px, -40px);
}
60% {
opacity:;
-webkit-transform: rotate(0deg) translate(-27px, -40px);
transform: rotate(0deg) translate(-27px, -40px);
}
80% {
opacity:;
-webkit-transform: rotate(10deg) translate(-27px, 5px);
transform: rotate(10deg) translate(-27px, 5px);
}
100% {
opacity:;
-webkit-transform: rotate(0deg) translate(-27px, 0px);
transform: rotate(0deg) translate(-27px, 0px);
}
} @keyframes music-move
{
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
33% {
-webkit-transform: rotate(-5deg);
transform: rotate(-5deg);
}
66% {
-webkit-transform: rotate(5deg);
transform: rotate(5deg);
}
100% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
} @-webkit-keyframes music-move /* Safari and Chrome */
{
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
33% {
-webkit-transform: rotate(-5deg);
transform: rotate(-5deg);
}
66% {
-webkit-transform: rotate(5deg);
transform: rotate(5deg);
}
100% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
} @keyframes eyebrow-anim-right
{
0% {
opacity:;
-webkit-transform: translateY(-25px);
transform: translateY(-25px);
}
70% {
opacity:;
-webkit-transform: translateY(5px);
transform: translateY(5px);
}
100% {
opacity:;
-webkit-transform: rotate(9deg) translateY(0px);
transform: rotate(9deg) translateY(0px);
}
} @-webkit-keyframes eyebrow-anim-right /* Safari and Chrome */
{
0% {
opacity:;
-webkit-transform: translateY(-25px);
transform: translateY(-25px);
}
70% {
opacity:;
-webkit-transform: translateY(5px);
transform: translateY(5px);
}
100% {
opacity:;
-webkit-transform: rotate(9deg) translateY(0px);
transform: rotate(9deg) translateY(0px);
}
}
@keyframes eyebrow-raise
{
0% {
top:-35px;
}
80% {
top:-35px; }
100% {
top:-45px;
}
} @-webkit-keyframes eyebrow-raise /* Safari and Chrome */
{
0% {
top:-35px;
}
80% {
top:-35px; }
100% {
top:-45px;
}
}
@keyframes eyebrow-anim-left
{
0% {
opacity:;
-webkit-transform: translateY(-25px);
transform: translateY(-25px);
}
70% {
opacity:;
-webkit-transform: translateY(5px);
transform: translateY(5px);
}
100% {
opacity:;
-webkit-transform:translateY(0px);
transform:translateY(0px);
}
} @-webkit-keyframes eyebrow-anim-left /* Safari and Chrome */
{
0% {
opacity:;
-webkit-transform: translateY(-25px);
transform: translateY(-25px);
}
70% {
opacity:;
-webkit-transform: translateY(5px);
transform: translateY(5px);
}
100% {
opacity:;
-webkit-transform:translateY(0px);
transform:translateY(0px);
}
} @keyframes border-pulse
{
0% {
-webkit-transform: scale(0);
transform: scale(0);
border-width: 20px;
}
40% {
-webkit-transform: scale(1);
transform: scale(1);
border-width: 20px;
margin-left: -220px;
margin-top: -220px;
}
100% {
-webkit-transform: scale(1.5);
transform: scale(1.5);
border-width: 0px;
border-style: double;
margin-left: -200px;
margin-top: -200px;
}
} @-webkit-keyframes border-pulse /* Safari and Chrome */
{
0% {
-webkit-transform: scale(0);
transform: scale(0);
border-width: 20px;
}
40% {
-webkit-transform: scale(1);
transform: scale(1);
border-width: 20px;
margin-left: -220px;
margin-top: -220px;
}
100% {
-webkit-transform: scale(1.5);
transform: scale(1.5);
border-width: 0px;
border-style: double;
margin-left: -200px;
margin-top: -200px;
}
}
@keyframes shadow-anim
{
0% {
opacity:;
-webkit-transform: translate(98px,0px);
transform: translate(98px,0px);
}
50% {
opacity:;
}
100% {
opacity:;
-webkit-transform: translate(0px,0px);
transform: translate(0px,0px);
}
} @-webkit-keyframes shadow-anim /* Safari and Chrome */
{
0% {
opacity:;
-webkit-transform: translate(98px,0px);
transform: translate(98px,0px);
}
50% {
opacity:;
}
100% {
opacity:;
-webkit-transform: translate(0px,0px);
transform: translate(0px,0px);
}
}
@keyframes triangle-light-anim
{
0% {
-webkit-transform: translate(200px,0px);
transform: translate(200px,0px);
}
100% {
-webkit-transform: rotate(45deg) translate(0px,0px);
transform: rotate(45deg) translate(0px,0px);
}
} @-webkit-keyframes triangle-light-anim /* Safari and Chrome */
{
0% {
-webkit-transform: translate(200px,0px);
transform: translate(200px,0px);
}
100% {
-webkit-transform: rotate(45deg) translate(0px,0px);
transform: rotate(45deg) translate(0px,0px);
}
}
@keyframes triangle-dark-anim
{
0% {
-webkit-transform: translate(-200px,0px);
transform: translate(-200px,0px);
}
100% {
-webkit-transform: rotate(-45deg) translate(0px,0px);
transform: rotate(-45deg) translate(0px,0px);
}
} @-webkit-keyframes triangle-dark-anim /* Safari and Chrome */
{
0% {
-webkit-transform: translate(-200px,0px);
transform: translate(-200px,0px);
}
100% {
-webkit-transform: rotate(-45deg) translate(0px,0px);
transform: rotate(-45deg) translate(0px,0px);
}
}
@keyframes note-anim
{
0% {
opacity:;
-webkit-transform: translate(0px,50px);
transform: translate(0px,50px);
}
30% {
-webkit-transform:rotate(12deg) translate(-30px,0px);
transform:rotate(12deg) translate(-30px,0px);
}
45% {
opacity:;
}
60% {
-webkit-transform:rotate(-12deg) translate(30px,-100px);
transform:rotate(-12deg) translate(30px,-100px);
}
100% {
opacity:;
-webkit-transform:rotate(0deg) translate(0px,-200px);
transform:rotate(0deg) translate(0px,-200px);
}
} @-webkit-keyframes note-anim /* Safari and Chrome */
{
0% {
opacity:;
-webkit-transform: translate(0px,50px);
transform: translate(0px,50px);
}
30% {
-webkit-transform:rotate(12deg) translate(-30px,0px);
transform:rotate(12deg) translate(-30px,0px);
}
45% {
opacity:;
}
60% {
-webkit-transform:rotate(-12deg) translate(30px,-100px);
transform:rotate(-12deg) translate(30px,-100px);
}
100% {
opacity:;
-webkit-transform:rotate(0deg) translate(0px,-200px);
transform:rotate(0deg) translate(0px,-200px);
}
}
@keyframes text-anim
{
0% {
-webkit-transform: translate(0px,100px);
transform: translate(0px,100px);
}
60% {
-webkit-transform:translate(0px,-20px);
transform:translate(0px,-20px);
}
80% {
-webkit-transform:translate(0px,15px);
transform:translate(0px,15px);
}
100% {
-webkit-transform:translate(0px,0px);
transform:translate(0px,0px);
}
} @-webkit-keyframes text-anim /* Safari and Chrome */
{
0% {
-webkit-transform: translate(0px,100px);
transform: translate(0px,100px);
}
60% {
-webkit-transform:translate(0px,-20px);
transform:translate(0px,-20px);
}
80% {
-webkit-transform:translate(0px,15px);
transform:translate(0px,15px);
}
100% {
-webkit-transform:translate(0px,0px);
transform:translate(0px,0px);
}
}
@keyframes eye-blink
{
0% {
-webkit-transform: scaleY(1) translateY(0px);
transform: scaleY(1) translateY(0px);
}
45% {
-webkit-transform: scaleY(1) translateY(0px);
transform: scaleY(1) translateY(0px);
}
50% {
-webkit-transform: scaleY(0.1);
transform: scaleY(0.1);
}
55% {
-webkit-transform: scaleY(1) translateY(0px);
transform: scaleY(1) translateY(0px);
}
100% {
-webkit-transform: scaleY(1) translateY(0px);
transform: scaleY(1) translateY(0px);
}
} @-webkit-keyframes eye-blink /* Safari and Chrome */
{
0% {
-webkit-transform: scaleY(1) translateY(0px);
transform: scaleY(1) translateY(0px);
}
45% {
-webkit-transform: scaleY(1) translateY(0px);
transform: scaleY(1) translateY(0px);
}
50% {
-webkit-transform: scaleY(0.1);
transform: scaleY(0.1);
}
55% {
-webkit-transform: scaleY(1) translateY(0px);
transform: scaleY(1) translateY(0px);
}
100% {
-webkit-transform: scaleY(1) translateY(0px);
transform: scaleY(1) translateY(0px);
}
}

全部css

帧的精妙,就只能靠天分了,呵呵!

纯CSS实现delay连续动画的更多相关文章

  1. 纯CSS实现3D正方体动画效果

    前言 纯CSS实现3D正方体动画效果,此方法是通过transform的旋转(rotate)和位移(translate)实现的,具体效果是鼠标滑过时正方体的一个面会产生位移 效果图 ​

  2. 纯css去实现loading动画效果图

    当项目中加载内容慢的的时候,需要显示一个loading动画效果图 之前我们使用的是一圈点点旋转的效果,现在设计修改为,如下gif图片效果-------------------------------- ...

  3. 纯css实现苹果表盘动画

    欢迎訪问我们的博客:http://www.w3ctrain.com/2015/07/06/Apple-Watch-Dials/ 随着苹果表的大量生产,我想.用CSS来实现拨号动画的时候到了. 在这篇文 ...

  4. 如何用纯 CSS 创作一个渐变色动画边框

    效果预览 在线演示 按下右侧的"点击预览"按钮可以在当前页面预览,点击链接可以全屏预览. https://codepen.io/comehope/pen/odpRKX 可交互视频教 ...

  5. 前端每日实战:16# 视频演示如何用纯 CSS 创作一个渐变色动画边框

    效果预览 按下右侧的"点击预览"按钮可以在当前页面预览,点击链接可以全屏预览. https://codepen.io/comehope/pen/odpRKX 可交互视频教程 此视频 ...

  6. 纯css代码写旋转动画

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  7. 16.纯 CSS 创作一个渐变色动画边框

    原文地址:https://segmentfault.com/a/1190000014785816 感想:边框是伪元素::after来的: HTML代码: <div class="box ...

  8. 前端每日实战:77# 视频演示如何用纯 CSS 创作旗帜飘扬的动画

    效果预览 按下右侧的"点击预览"按钮可以在当前页面预览,点击链接可以全屏预览. https://codepen.io/comehope/pen/qydvBm 可交互视频 此视频是可 ...

  9. 纯CSS方块转化梯形动画

    http://jasonning92.github.io/JasonsBlog/pages/%E7%BA%AFCSS%E6%96%B9%E5%9D%97%E8%BD%AC%E5%8C%96%E6%A2 ...

随机推荐

  1. LabVIEW的错误簇以及错误处理函数

    我们可以在LabVIEW的Modern>>Array, Matrix & Cluster控件面板找到表示错误簇数据类型的错误输入(Error In)以及错误输出(Error Out ...

  2. xcode 4 安装cocos2d-x 2.1.4

    http://blog.csdn.net/xiaominghimi/article/details/6937685 从今天开始Himi将陆续更新cocos2d-X的博文,毕竟cocos2d-X的跨平台 ...

  3. j2ee学习笔记URLEncoder.encode(String , enc)处理特殊字符

    从页面上传递数据时,特殊字符对于超链接会自动进行解码 : 其他方式需要手动进行解码.

  4. android js 互调

    public class BoatsActivity extends Activity { Handler mHandler = new Handler();//处理消息的handler @Suppr ...

  5. Android WebView的loadData方法注意事项

    loadData()中的html data中不能包含'#', '%', '\', '?'四中特殊字符,出现这种字符就会出现解析错误,显示找不到网页还有部分html代码.需要如何处理呢?我们需要用Url ...

  6. Ubuntu16.04下Intellij IDEA不能输入中文的问题

    最近Ubuntu升级到16.04后发现IDEA的中文输入法不能正常切换了. 之前用的是fcitx安装的输入法, 折腾了半天才解决. 只需要修改idea.sh文件即可. 不需要折腾fcitx中的配置. ...

  7. 绝对定位的DIV绝对居中显示

    绝对居中:即在客户端上任何分辨率下纵横方向均居中 紫色的正方形为绝对定位的div position:absolute; top: 50%; left: 50%; 只能把div定位在以红色圈为起点的位置 ...

  8. 使用原生JS编写ajax操作XMLHttpRequst对象

    ajax其本质就是XMLHttpRequest,现在jquery调用异步的方法很方便,但是也不能忘记原生的JS去编写ajax; 需要注意的是,很多人在写的时候喜欢只用XMLHttpRequest对象r ...

  9. python基础知识三

    在考虑它们的运算时,一定要想到python是一门面向对象语言,它对类型的要求是不那么严格的,因为在完全面向对象的语言中,一切都是对象. 那么让我们重新 考虑+ -  *  /等操作,不再拘泥于传统的数 ...

  10. 关于HMTL -[HTML5]

    前言: 为什么学习它?(HTML5) 会不会HTML5,其实并不会影响我的开发效率,我觉得终究还是跟个人性格有关,我喜欢前沿的东西.这就好比我大学里学的计算机,但我仍然会去看一些跟专业不相关的书籍一样 ...