网络动画设计HTML5,HTML5 Web动画设计原则之10 - 夸张

CSS

语言:

CSSSCSS

确定

.ten .shape {

-webkit-animation: ten 4s infinite linear;

animation: ten 4s infinite linear;

-webkit-transform-origin: 50% 8em;

-ms-transform-origin: 50% 8em;

transform-origin: 50% 8em;

top: calc(50% - 6em);

}

@-webkit-keyframes ten {

0%, 10% {

-webkit-transform: none;

transform: none;

-webkit-animation-timing-function: cubic-bezier(0.87, -1.05, 0.66, 1.31);

animation-timing-function: cubic-bezier(0.87, -1.05, 0.66, 1.31);

}

40% {

-webkit-transform: rotateZ(-45deg) scale(2);

transform: rotateZ(-45deg) scale(2);

-webkit-animation-timing-function: cubic-bezier(0.16, 0.54, 0, 1.38);

animation-timing-function: cubic-bezier(0.16, 0.54, 0, 1.38);

}

70%,

100% {

-webkit-transform: rotateZ(360deg) scale(1);

transform: rotateZ(360deg) scale(1);

}

}

@keyframes ten {

/* General styling */

0%, 10% {

-webkit-transform: none;

transform: none;

-webkit-animation-timing-function: cubic-bezier(0.87, -1.05, 0.66, 1.31);

animation-timing-function: cubic-bezier(0.87, -1.05, 0.66, 1.31);

}

40% {

-webkit-transform: rotateZ(-45deg) scale(2);

transform: rotateZ(-45deg) scale(2);

-webkit-animation-timing-function: cubic-bezier(0.16, 0.54, 0, 1.38);

animation-timing-function: cubic-bezier(0.16, 0.54, 0, 1.38);

}

70%,

100% {

-webkit-transform: rotateZ(360deg) scale(1);

transform: rotateZ(360deg) scale(1);

}

}

body {

margin: 0;

background: #e9b59f;

font-family: HelveticaNeue, Arial, Sans-serif;

color: #fff;

}

h1 {

position: absolute;

top: 0;

left: 0;

right: 0;

text-align: center;

font-weight: 300;

}

h2 {

font-size: 0.75em;

position: absolute;

bottom: 0;

left: 0;

right: 0;

text-align: center;

}

a {

text-decoration: none;

color: #333;

}

.principle {

width: 100%;

height: 100vh;

position: relative;

}

.shape {

background: #2d97db;

border: 1em solid #fff;

width: 4em;

height: 4em;

position: absolute;

top: calc(50% - 2em);

left: calc(50% - 2em);

}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值