之前为大家分享了很多jquery和css3的动画实例。今天给大家带来一款非常炫的jquery和css3实现的卡通人物动画特效。效果图如下:
实现的代码。
html代码:
<div class="wrapper">
<div class="border-circle" id="one">
</div>
<div class="border-circle" id="two">
</div>
<div class="background-circle">
<div class="triangle-light">
</div>
<div class="body">
</div>
<span class="shirt-text">W</span> <span class="shirt-text">E</span> <span class="shirt-text">
♥</span> <span class="shirt-text">S</span> <span class="shirt-text">A</span>
<span class="shirt-text">L</span> <span class="shirt-text">E</span> <span class="shirt-text">
S</span>
<div class="triangle-dark">
</div>
</div>
<div class="arms">
</div>
<div class="head">
<div class="ear" id="left">
</div>
<div class="ear" id="right">
</div>
<div class="hair-main">
<div class="sideburn" id="left">
</div>
<div class="sideburn" id="right">
</div>
<div class="hair-top">
</div>
<div class="hair-back">
</div>
</div>
<div class="face">
<div class="hair-bottom">
</div>
<div class="nose">
</div>
<div class="eye-shadow" id="left">
<div class="eyebrow">
</div>
<div class="eye-one">
<div class="iris">
</div>
</div>
</div>
<div class="eye-shadow" id="right">
<div class="eyebrow">
</div>
<div class="eye-two">
<div class="iris">
</div>
</div>
</div>
<div class="mouth">
</div>
<div class="shadow-wrapper">
<div class="shadow">
</div>
</div>
</div>
</div>
<span class="music-note" id="one">$</span> <span class="music-note" id="two">$</span>
</div>
css3代码:
body, html{
width:100%;
height:100%;
margin:;
display: table;
text-align: center;
z-index:;
} .wrapper{
display: table-cell;
vertical-align: middle;
position: relative;
}
.background-circle{
width: 100vw;
height: 400px;
border-radius: 0%;
overflow: hidden;
z-index:-1;
margin: 0 auto;
background: #FFE6E1;
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: 150px;
height: 600px;
margin: 0 auto;
background: #ff5200;
border-radius: 10%;
position: relative;
z-index:;
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;
/* box-shadow: 2px 3px 4px rgba(0,0,0,.4);
*/} .head{
width: 156px;
height: 220px;
z-index:;
border-radius: 100%;
background: #FFE4BE;
position: absolute;
top: 50%;
left: 50%;
margin-top: -210px;
margin-left: -80px;
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:180px;
height: 0px;
background:#D8C078;
border-radius: 54px 54px 0px 0px;
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-back{
width:30px;
height: 0px;
background: #D8C078;
border-radius:40%;
right:-90%;
animation:hairback-anim 0.7s 0.9s 1 ease;
animation-fill-mode: forwards;
-webkit-animation:hairback-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: D8C078;
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;
-webkit-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: #D8C078;
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;
-webkit-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:#D8C078;
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: 120px;
height: 0px;
border-radius: 20%;
background: #FFE4BE;
position: absolute;
top: 40px;
left: 20px;
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: 10px;
height: 35px;
opacity:;
background: #FFE4BE;
border-top-left-radius: 20px;
position: absolute;
left: 60%;
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;
z-index:;
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: 56px;
height: 23px;
border-radius: 0 0 33px 33px;
background: white;
position: absolute;
top: 130px;
left: 55%;
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:40px;
height: 10px;
border-radius: 0 0 15px 15px;
background:rgba(149,36,0,0);
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:0% ;
z-index:;
}
.eye-shadow#right{
right:10% ; }
.eyebrow{
width: 40px;
height: 2px;
background: #D8C078;
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-one{overflow:hidden;
width: 40px;
height: 20px;
border-radius: 100%;
background: white;
position: relative;
top: -18px;
padding:1px; 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; }
.eye-two{overflow:hidden;
width: 40px;
height: 20px;
border-radius: 100%;
background: white;
position: relative;
top: -18px;
padding:1px; 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; }
.iris{
width: 20px;
height: 20px;
border-radius: 100%;
background: skyblue;
border:1px solid rgba(0,0,0,.2);
}
.shadow-wrapper{
width: 98px;
height: 260px;
position: absolute;
left: -20px;
bottom: -84px;
overflow: hidden;
}
.shadow{
width: 98px;
height: 190px;
border-radius: 20%;
background: rgba(149,36,0,0.05);
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%;
z-index:-1;
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{
z-index:;
font-family: 'Helvetica Neue', sans-serif;
font-weight:;
color: white;
position: relative;
top: -300px;
font-size:20px;
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){
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){
color: red; 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;
}
.shirt-text:nth-of-type(6){
animation: text-anim 0.7s 3.4s 1 ease;
-webkit-animation: text-anim 0.7s 3.4s 1 ease;
}
.shirt-text:nth-of-type(7){
animation: text-anim 0.7s 3.4s 1 ease;
-webkit-animation: text-anim 0.7s 3.4s 1 ease;
}
.shirt-text:nth-of-type(8){
animation: text-anim 0.7s 3.4s 1 ease;
-webkit-animation: text-anim 0.7s 3.4s 1 ease;
} .arms{
position:relative;
width:200px;
height:50px;
z-index:;
margin: 0 auto;
border-radius:20%;
background: #ff5200;
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; }
@keyframes grow
{
0% {
-webkit-transform: scale(0) translateZ(0);
transform: scale(0) translateZ(0);
}
60% {
-webkit-transform: scale(1.15) translateZ(0);
transform: scale(1.15) translateZ(0);
}
80% {
-webkit-transform: scale(0.95) translateZ(0);
transform: scale(0.95) translateZ(0);
}
100% {
-webkit-transform: scale(1) translateZ(0);
transform: scale(1) translateZ(0);
}
} @-webkit-keyframes grow /* Safari and Chrome */
{
0% {
-webkit-transform: scale(0) translateZ(0);
transform: scale(0) translateZ(0);
}
60% {
-webkit-transform: scale(1.15) translateZ(0);
transform: scale(1.15) translateZ(0);
}
80% {
-webkit-transform: scale(0.95) translateZ(0);
transform: scale(0.95) translateZ(0);
}
100% {
-webkit-transform: scale(1) translateZ(0);
transform: scale(1) translateZ(0);
}
} @keyframes body-enter
{
0% {
-webkit-transform: translateY(200px) translateZ(0);
transform: translateY(200px) translateZ(0);
}
60% {
-webkit-transform: translateY(-20px) translateZ(0);
transform: translateY(-20px) translateZ(0);
}
80% {
-webkit-transform: translateY(30px) translateZ(0);
transform: translateY(30px) translateZ(0);
}
100% {
-webkit-transform: translateY(0px) translateZ(0);
transform: translateY(0px) translateZ(0);
}
} @-webkit-keyframes body-enter /* Safari and Chrome */
{
0% {
-webkit-transform: translateY(200px) translateZ(0);
transform: translateY(200px) translateZ(0);
}
60% {
-webkit-transform: translateY(-20px) translateZ(0);
transform: translateY(-20px) translateZ(0);
}
80% {
-webkit-transform: translateY(30px) translateZ(0);
transform: translateY(30px) translateZ(0);
}
100% {
-webkit-transform: translateY(0px) translateZ(0);
transform: translateY(0px) translateZ(0);
}
}
@keyframes hairback-anim
{
0% {
height:0px;
-webkit-transform: translateY(137px) translateZ(0);
transform: translateY(137px) translateZ(0);
z-index:;
}
100% {
height: 237px;
-webkit-transform: translateY(0px) translateZ(0);
transform: translateY(0px) translateZ(0);
z-index:;
}
} @-webkit-keyframes hairback-anim /* Safari and Chrome */
{
0% {
height:0px;
-webkit-transform: translateY(137px) translateZ(0);
transform: translateY(137px) translateZ(0);
}
100% {
height: 237px;
-webkit-transform: translateY(0px) translateZ(0);
transform: translateY(0px) translateZ(0);
}
}
@keyframes hair-anim
{
0% {
height:0px;
-webkit-transform: translateY(137px) translateZ(0);
transform: translateY(137px) translateZ(0);
}
100% {
height: 137px;
-webkit-transform: translateY(0px) translateZ(0);
transform: translateY(0px) translateZ(0);
}
} @-webkit-keyframes hair-anim /* Safari and Chrome */
{
0% {
height:0px;
-webkit-transform: translateY(137px) translateZ(0);
transform: translateY(137px) translateZ(0);
}
100% {
height: 137px;
-webkit-transform: translateY(0px) translateZ(0);
transform: translateY(0px) translateZ(0);
}
} @keyframes sideburn-anim
{
0% {
opacity:;
-webkit-transform: translateY(-25px) translateZ(0);
transform: translateY(-25px) translateZ(0);
}
100% {
opacity:;
-webkit-transform: translateY(0px) translateZ(0);
transform: translateY(0px) translateZ(0);
}
} @-webkit-keyframes sideburn-anim /* Safari and Chrome */
{
0% {
opacity:;
-webkit-transform: translateY(-25px) translateZ(0);
transform: translateY(-25px) translateZ(0);
}
100% {
opacity:;
-webkit-transform: translateY(0px) translateZ(0);
transform: translateY(0px) translateZ(0);
}
} @keyframes hair-top-anim
{
0% {
opacity:;
-webkit-transform:translate(-64px, 30px) translateZ(0);
transform:translate(-64px, 30px) translateZ(0);
}
60% {
opacity:;
-webkit-transform: rotate(0deg) translate(-64px, 30px) translateZ(0);
transform: rotate(0deg) translate(-64px, 30px) translateZ(0);
}
80% {
opacity:;
-webkit-transform: rotate(10deg) translate(-64px, -5px) translateZ(0);
transform: rotate(10deg) translate(-64px, -5px) translateZ(0);
}
100% {
opacity:;
-webkit-transform: rotate(0deg) translate(-64px, 0px) translateZ(0);
transform: rotate(0deg) translate(-64px, 0px) translateZ(0);
}
} @-webkit-keyframes hair-top-anim /* Safari and Chrome */
{
0% {
opacity:;
-webkit-transform:translate(-64px, 30px) translateZ(0);
transform:translate(-64px, 30px) translateZ(0);
}
60% {
opacity:;
-webkit-transform: rotate(0deg) translate(-64px, 30px) translateZ(0);
transform: rotate(0deg) translate(-64px, 30px) translateZ(0);
}
80% {
opacity:;
-webkit-transform: rotate(10deg) translate(-64px, -5px) translateZ(0);
transform: rotate(10deg) translate(-64px, -5px) translateZ(0);
}
100% {
opacity:;
-webkit-transform: rotate(0deg) translate(-64px, 0px) translateZ(0);
transform: rotate(0deg) translate(-64px, 0px) translateZ(0);
}
} @keyframes hair-bottom-anim
{
0% {
opacity:;
-webkit-transform:translate(-27px, -40px) translateZ(0);
transform:translate(-27px, -40px) translateZ(0);
}
60% {
opacity:;
-webkit-transform: rotate(0deg) translate(-27px, -40px) translateZ(0);
transform: rotate(0deg) translate(-27px, -40px) translateZ(0);
}
80% {
opacity:;
-webkit-transform: rotate(10deg) translate(-27px, 5px) translateZ(0);
transform: rotate(10deg) translate(-27px, 5px) translateZ(0);
}
100% {
opacity:;
-webkit-transform: rotate(0deg) translate(-27px, 0px) translateZ(0);
transform: rotate(0deg) translate(-27px, 0px) translateZ(0);
}
} @-webkit-keyframes hair-bottom-anim /* Safari and Chrome */
{
0% {
opacity:;
-webkit-transform:translate(-27px, -40px) translateZ(0);
transform:translate(-27px, -40px) translateZ(0);
}
60% {
opacity:;
-webkit-transform: rotate(0deg) translate(-27px, -40px) translateZ(0);
transform: rotate(0deg) translate(-27px, -40px) translateZ(0);
}
80% {
opacity:;
-webkit-transform: rotate(10deg) translate(-27px, 5px) translateZ(0);
transform: rotate(10deg) translate(-27px, 5px) translateZ(0);
}
100% {
opacity:;
-webkit-transform: rotate(0deg) translate(-27px, 0px) translateZ(0);
transform: rotate(0deg) translate(-27px, 0px) translateZ(0);
}
} @keyframes music-move
{
0% {
-webkit-transform: rotate(0deg) translateZ(0);
transform: rotate(0deg) translateZ(0);
}
33% {
-webkit-transform: rotate(-5deg) translateZ(0);
transform: rotate(-5deg) translateZ(0);
}
66% {
-webkit-transform: rotate(5deg) translateZ(0);
transform: rotate(5deg) translateZ(0);
}
100% {
-webkit-transform: rotate(0deg) translateZ(0);
transform: rotate(0deg) translateZ(0);
}
} @-webkit-keyframes music-move /* Safari and Chrome */
{
0% {
-webkit-transform: rotate(0deg) translateZ(0);
transform: rotate(0deg) translateZ(0);
}
33% {
-webkit-transform: rotate(-5deg) translateZ(0);
transform: rotate(-5deg) translateZ(0);
}
66% {
-webkit-transform: rotate(5deg) translateZ(0);
transform: rotate(5deg) translateZ(0);
}
100% {
-webkit-transform: rotate(0deg) translateZ(0);
transform: rotate(0deg) translateZ(0);
}
} @keyframes eyebrow-anim-right
{
0% {
opacity:;
-webkit-transform: translateY(-25px) translateZ(0);
transform: translateY(-25px) translateZ(0);
}
70% {
opacity:;
-webkit-transform: translateY(5px) translateZ(0);
transform: translateY(5px) translateZ(0);
}
100% {
opacity:;
-webkit-transform: rotate(9deg) translateY(0px) translateZ(0);
transform: rotate(9deg) translateY(0px) translateZ(0);
}
} @-webkit-keyframes eyebrow-anim-right /* Safari and Chrome */
{
0% {
opacity:;
-webkit-transform: translateY(-25px) translateZ(0);
transform: translateY(-25px) translateZ(0);
}
70% {
opacity:;
-webkit-transform: translateY(5px) translateZ(0);
transform: translateY(5px) translateZ(0);
}
100% {
opacity:;
-webkit-transform: rotate(9deg) translateY(0px) translateZ(0);
transform: rotate(9deg) translateY(0px) translateZ(0);
}
}
@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) translateZ(0);
transform: translateY(-25px) translateZ(0);
}
70% {
opacity:;
-webkit-transform: translateY(5px) translateZ(0);
transform: translateY(5px);
}
100% {
opacity:;
-webkit-transform:translateY(0px) translateZ(0);
transform:translateY(0px) translateZ(0);
}
} @-webkit-keyframes eyebrow-anim-left /* Safari and Chrome */
{
0% {
opacity:;
-webkit-transform: translateY(-25px) translateZ(0);
transform: translateY(-25px) translateZ(0);
}
70% {
opacity:;
-webkit-transform: translateY(5px) translateZ(0);
transform: translateY(5px) translateZ(0);
}
100% {
opacity:;
-webkit-transform:translateY(0px) translateZ(0);
transform:translateY(0px) translateZ(0);
}
} @keyframes border-pulse
{
0% {
-webkit-transform: scale(0) translateZ(0);
transform: scale(0) translateZ(0);
border-width: 20px;
}
40% {
-webkit-transform: scale(1) translateZ(0);
transform: scale(1) translateZ(0);
border-width: 20px;
margin-left: -220px;
margin-top: -220px;
}
100% {
-webkit-transform: scale(1.5) translateZ(0);
transform: scale(1.5) translateZ(0);
border-width: 0px;
border-style: double;
margin-left: -200px;
margin-top: -200px;
}
} @-webkit-keyframes border-pulse /* Safari and Chrome */
{
0% {
-webkit-transform: scale(0) translateZ(0);
transform: scale(0) translateZ(0);
border-width: 20px;
}
40% {
-webkit-transform: scale(1) translateZ(0);
transform: scale(1) translateZ(0);
border-width: 20px;
margin-left: -220px;
margin-top: -220px;
}
100% {
-webkit-transform: scale(1.5) translateZ(0);
transform: scale(1.5) translateZ(0);
border-width: 0px;
border-style: double;
margin-left: -200px;
margin-top: -200px;
}
}
@keyframes shadow-anim
{
0% {
opacity:;
-webkit-transform: translate(98px,0px) translateZ(0);
transform: translate(98px,0px) translateZ(0);
}
50% {
opacity:;
}
100% {
opacity:;
-webkit-transform: translate(0px,0px) translateZ(0);
transform: translate(0px,0px) translateZ(0);
}
} @-webkit-keyframes shadow-anim /* Safari and Chrome */
{
0% {
opacity:;
-webkit-transform: translate(98px,0px) translateZ(0);
transform: translate(98px,0px) translateZ(0);
}
50% {
opacity:;
}
100% {
opacity:;
-webkit-transform: translate(0px,0px) translateZ(0);
transform: translate(0px,0px) translateZ(0);
}
}
@keyframes triangle-light-anim
{
0% {
-webkit-transform: translate(200px,0px) translateZ(0);
transform: translate(200px,0px) translateZ(0);
}
100% {
-webkit-transform: rotate(45deg) translate(0px,0px) translateZ(0);
transform: rotate(45deg) translate(0px,0px) translateZ(0);
}
} @-webkit-keyframes triangle-light-anim /* Safari and Chrome */
{
0% {
-webkit-transform: translate(200px,0px) translateZ(0);
transform: translate(200px,0px) translateZ(0);
}
100% {
-webkit-transform: rotate(45deg) translate(0px,0px) translateZ(0);
transform: rotate(45deg) translate(0px,0px) translateZ(0);
}
}
@keyframes triangle-dark-anim
{
0% {
-webkit-transform: translate(-200px,0px) translateZ(0);
transform: translate(-200px,0px) translateZ(0);
}
100% {
-webkit-transform: rotate(-45deg) translate(0px,0px) translateZ(0);
transform: rotate(-45deg) translate(0px,0px) translateZ(0);
}
} @-webkit-keyframes triangle-dark-anim /* Safari and Chrome */
{
0% {
-webkit-transform: translate(-200px,0px) translateZ(0);
transform: translate(-200px,0px) translateZ(0);
}
100% {
-webkit-transform: rotate(-45deg) translate(0px,0px) translateZ(0);
transform: rotate(-45deg) translate(0px,0px) translateZ(0);
}
}
@keyframes note-anim
{
0% {
opacity:;
-webkit-transform: translate(0px,50px) translateZ(0);
transform: translate(0px,50px) translateZ(0);
}
30% {
-webkit-transform:rotate(12deg) translate(-30px,0px) translateZ(0);
transform:rotate(12deg) translate(-30px,0px) translateZ(0);
}
45% {
opacity:;
}
60% {
-webkit-transform:rotate(-12deg) translate(30px,-100px) translateZ(0);
transform:rotate(-12deg) translate(30px,-100px) translateZ(0);
}
100% {
opacity:;
-webkit-transform:rotate(0deg) translate(0px,-200px) translateZ(0);
transform:rotate(0deg) translate(0px,-200px) translateZ(0);
}
} @-webkit-keyframes note-anim /* Safari and Chrome */
{
0% {
opacity:;
-webkit-transform: translate(0px,50px) translateZ(0);
transform: translate(0px,50px) translateZ(0);
}
30% {
-webkit-transform:rotate(12deg) translate(-30px,0px) translateZ(0);
transform:rotate(12deg) translate(-30px,0px) translateZ(0);
}
45% {
opacity:;
}
60% {
-webkit-transform:rotate(-12deg) translate(30px,-100px) translateZ(0);
transform:rotate(-12deg) translate(30px,-100px) translateZ(0);
}
100% {
opacity:;
-webkit-transform:rotate(0deg) translate(0px,-200px) translateZ(0);
transform:rotate(0deg) translate(0px,-200px) translateZ(0);
}
}
@keyframes text-anim
{
0% {
-webkit-transform: translate(0px,100px) translateZ(0);
transform: translate(0px,100px) translateZ(0);
}
60% {
-webkit-transform:translate(0px,-20px) translateZ(0);
transform:translate(0px,-20px) translateZ(0);
}
80% {
-webkit-transform:translate(0px,15px) translateZ(0);
transform:translate(0px,15px) translateZ(0);
}
100% {
-webkit-transform:translate(0px,0px) translateZ(0);
transform:translate(0px,0px) translateZ(0);
}
} @-webkit-keyframes text-anim /* Safari and Chrome */
{
0% {
-webkit-transform: translate(0px,100px) translateZ(0);
transform: translate(0px,100px) translateZ(0);
}
60% {
-webkit-transform:translate(0px,-20px) translateZ(0);
transform:translate(0px,-20px) translateZ(0);
}
80% {
-webkit-transform:translate(0px,15px) translateZ(0);
transform:translate(0px,15px) translateZ(0);
}
100% {
-webkit-transform:translate(0px,0px) translateZ(0);
transform:translate(0px,0px) translateZ(0);
}
}
@keyframes eye-blink
{
0% {
-webkit-transform: scaleY(1) translateY(0px) translateZ(0);
transform: scaleY(1) translateY(0px) translateZ(0);
}
45% {
-webkit-transform: scaleY(1) translateY(0px) translateZ(0);
transform: scaleY(1) translateY(0px) translateZ(0);
}
50% {
-webkit-transform: scaleY(0.1) translateZ(0);
transform: scaleY(0.1) translateZ(0);
}
55% {
-webkit-transform: scaleY(1) translateY(0px);
transform: scaleY(1) translateY(0px);
}
100% {
-webkit-transform: scaleY(1) translateY(0px) translateZ(0);
transform: scaleY(1) translateY(0px) translateZ(0);
}
} @-webkit-keyframes eye-blink /* Safari and Chrome */
{
0% {
-webkit-transform: scaleY(1) translateY(0px) translateZ(0);
transform: scaleY(1) translateY(0px) translateZ(0);
}
45% {
-webkit-transform: scaleY(1) translateY(0px) translateZ(0);
transform: scaleY(1) translateY(0px) translateZ(0);
}
50% {
-webkit-transform: scaleY(0.1) translateZ(0);
transform: scaleY(0.1) translateZ(0);
}
55% {
-webkit-transform: scaleY(1) translateY(0px) translateZ(0);
transform: scaleY(1) translateY(0px) translateZ(0);
}
100% {
-webkit-transform: scaleY(1) translateY(0px) translateZ(0);
transform: scaleY(1) translateY(0px) translateZ(0);
}
}
js代码:
var mouseX = 0, mouseY = 0;
$(document).mousemove(function (e) {
mouseX = e.pageX;
mouseY = e.pageY;
}); var follower = $(".iris");
var xp = 0, yp = 0;
var loop = setInterval(function () {
xp += (mouseX - xp);
yp += (mouseY - yp);
follower.css({ "margin-left": (xp / 60), "margin-top": (yp / 90) }); }, 30);
本文爱编程原创文章,转载请注明原文地址:http://www.w2bc.com/Article/12449
一款jquery和css3实现的卡通人物动画特效的更多相关文章
-
分享9款用HTML5/CSS3制作的动物人物动画
1.纯CSS3绘制可爱的蚱蜢 还有眨眼动画 今天我们要分享一个利用纯CSS3绘制的蚱蜢动画,非常可爱. 在线演示 源码下载 2.HTML5 Canvas头发飘逸动画 很酷的HTML5动画 HTML5 ...
-
基于jQ+CSS3页面滚动内容元素动画特效
今天给大家分享一款基于jQ+CSS3页面滚动内容元素动画特效.这是一款基于jQuery+CSS3实现的页面滚动代码.该实例适用于适用浏览器:360.FireFox.Chrome.Safari.Oper ...
-
jQuery和CSS3炫酷button点击波特效
这是一款效果很炫酷的jQuery和CSS3炫酷button点击波特效.该特效当用户在菜单button上点击的时候.从鼠标点击的点開始,会有一道光波以改点为原点向外辐射的动画效果,很绚丽. 在线演示:h ...
-
一款jquery编写图文下拉二级导航菜单特效
一款jquery编写图文下拉二级导航菜单特效,效果非常简洁大气,很不错的一款jquery导航菜单特效. 这款jquery特效适用于很多的个人和门户网站. 适用浏览器:IE8.360.FireFox.C ...
-
一款基于jQuery和CSS3炫酷3D旋转画廊特效插件
这是一款效果炫酷的jQuery和CSS3 3D旋转画廊特效插件.该3D画廊插件可以通过前后导航按钮来切换图片,效果就像旋转木马一样.它还带有点击放大图片,显示图片标题和用键盘操作等功能. 在线预览 ...
-
jquery和css3打造超梦幻的三维动画背景
今天为大家带来的是一款由jquery和css3实现的超级梦幻的背景效果.绿色的小原点由远到近,由近到远一种飞跃效果.效果非常好看,我们一起看下效果图: 在线预览 源码下载 我们一起看下实现的代码. ...
-
分享十个CSS3鼠标滑过文字动画特效
介绍10组基于CSS3的鼠标滑过文字动画特效,有上凸.下凹等文字动画.这些炫酷的CSS3文字效果可以让网页变得更加绚丽.效果图如下: 在线预览 源码下载 实现的代码. html代码: <h2 ...
-
利用CSS3实现div页面淡入动画特效
利用CSS3实现页面淡入动画特效 摘要 利用CSS3动画属性"@keyframes "可实现一些动态特效,具体语法和参数可以网上自行学习.这篇文章主要是实践应用一下这个动画属性 ...
-
纯css3 3D图片立方体旋转动画特效
纯css3 3D立方体模块,鼠标触碰,模块炸开,大立方体中套小立方体 效果展示 手机扫描二维码体验效果: 效果图如下: 源码下载:http://hovertree.com/h/bjaf/0qmul8g ...
随机推荐
-
Oracle安装时OracleMTSRecoveryService找不到
电脑重做系统之后再安装oracle过程中出现一个问题,说OracleMTSRecoveryService找不到指定的目录文件,卸载重装还是没有改变,挣了半天终于找到怎么更改了,打开注册表编辑器,SYS ...
-
使用sui实现的选择控件【性别、日期、省市级联】
使用sui mobile做的选择控件,其中sm.js有修改,增加自定义api,详情请看index.html的注释,不多说了,上代码 <!DOCTYPE html> <html> ...
-
leetcode--010 Linked List Cycle II
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAApAAAACICAIAAADfzUzYAAANeklEQVR4nO3dQa7bthbG8W4mK/A+so
-
Docker(十):Docker安全
1.Docker安全主要体现在如下方面 a)Docker容器的安全性 b)镜像安全性 c)Docker daemon安全性 2.安装策略 2.1 Cgroup Cgroup用于限制容器对CPU.内存的 ...
-
2015-10-27 C#3
三.字符串拼凑stringbuilder stringbuilder sb= new stringbuilder(); sb.append("aaa"); sb.append(&q ...
-
JavaMail实现邮箱之间发送邮件功能
package com.minstone.message.util; import java.util.Date; import java.util.Properties; import javax. ...
-
java链接mysql 中文乱码
{转!} 背景: 由于最近在开发一个APP的后台程序,需要Java连接远程的MySQL数据库进行数据的更新和查询操作,并且插入的数据里有中文,在插入到数据库后发现中文都是乱码.网上查了很多教程,最后都 ...
-
修复日志,阻止给日志多次添加handlers时候重复打印的问题
1.解决如果多次添加handlers重复打印的问题.在__add_handlers方法中作出判断. 2.由get_logger_and_add_handlers和get_logger_without_ ...
-
【Java知识点专项练习】之 volatile 关键字的功能
volatile是java中的一个类型修饰符.它是被设计用来修饰被不同线程访问和修改的变量.如果不加入volatile,基本上会导致这样的结果:要么无法编写多线程程序,要么编译器 失去大量优化的机会. ...
-
如何高效使用Google
摘自http://simplyy.space/ 核心思想 1.首先,想好你想要寻找什么. 哪些词能够最好地描述你要寻找的信息或者概念? 哪些词是你能够用来替换的? 有没有那些词是可以不必包括在你想要搜 ...