Css3动画变化时间,CSS3 5个时间函数动画对比

CSS

语言:

CSSSCSS

确定

* {

-webkit-transition: opacity 0.5s ease;

transition: opacity 0.5s ease;

}

body {

background: #232a3e;

background-image: url("http://frolovoleg.ru/images/16.svg");

}

.timeFunctions {

color: rgba(255, 255, 255, 0.2);

position: absolute;

font-size: 12px;

font-family: monospace;

padding-top: 11px;

padding-left: 16px;

}

.timeFunctions .ease,

.timeFunctions .ease-in,

.timeFunctions .ease-out,

.timeFunctions .ease-in-out,

.timeFunctions .cubic-bezier {

line-height: 32px;

opacity: 0.4;

}

.timeFunctions .ease:hover,

.timeFunctions .ease-in:hover,

.timeFunctions .ease-out:hover,

.timeFunctions .ease-in-out:hover,

.timeFunctions .cubic-bezier:hover {

cursor: pointer;

}

.timeFunctions .ease {

color: #2cc0ff;

}

.timeFunctions .ease-in {

color: #2cff7a;

}

.timeFunctions .ease-out {

color: #ffe92c;

}

.timeFunctions .ease-in-out {

color: #ff832c;

}

.timeFunctions .cubic-bezier {

color: #ff2c42;

opacity: 1;

}

.cubic-bezier {

color: rgba(255, 255, 255, 0.8);

}

.dot {

width: 48px;

height: 48px;

border-radius: 50%;

background: #2cc0ff;

position: absolute;

top: 100%;

left: 0%;

opacity: 0.2;

margin-top: -48px;

-webkit-animation: Anime 2s ease alternate infinite;

animation: Anime 2s ease alternate infinite;

}

.dot2 {

width: 48px;

height: 48px;

border-radius: 50%;

background: #2cff7a;

position: absolute;

top: 100%;

left: 0%;

opacity: 0.2;

margin-top: -48px;

-webkit-animation: Anime 2s ease-in alternate infinite;

animation: Anime 2s ease-in alternate infinite;

}

.dot3 {

width: 48px;

height: 48px;

border-radius: 50%;

background: #ffe92c;

position: absolute;

top: 100%;

left: 0%;

opacity: 0.2;

margin-top: -48px;

-webkit-animation: Anime 2s ease-out alternate infinite;

animation: Anime 2s ease-out alternate infinite;

}

.dot4 {

width: 48px;

height: 48px;

border-radius: 50%;

background: #ff832c;

position: absolute;

top: 100%;

left: 0%;

opacity: 0.2;

margin-top: -48px;

-webkit-animation: Anime 2s ease-in-out alternate infinite;

animation: Anime 2s ease-in-out alternate infinite;

}

.dot5 {

width: 48px;

height: 48px;

border-radius: 50%;

background: #ff2c42;

position: absolute;

top: 100%;

left: 0%;

opacity: 0.2;

margin-top: -48px;

-webkit-animation: Anime 2s cubic-bezier(0, 0.8, 1, 0.2) alternate infinite;

animation: Anime 2s cubic-bezier(0, 0.8, 1, 0.2) alternate infinite;

opacity: 1;

}

.wrap {

width: 48px;

position: absolute;

height: 100vh;

left: 0%;

-webkit-animation: Anime2 2s linear alternate infinite;

animation: Anime2 2s linear alternate infinite;

}

@-webkit-keyframes Anime {

0% {

top: 100%;

margin-top: -48px;

}

100% {

top: 0%;

margin-top: 0px;

}

}

@keyframes Anime {

0% {

top: 100%;

margin-top: -48px;

}

100% {

top: 0%;

margin-top: 0px;

}

}

@-webkit-keyframes Anime2 {

0% {

left: 0%;

margin-left: 0px;

}

100% {

left: 100%;

margin-left: -48px;

}

}

@keyframes Anime2 {

0% {

left: 0%;

margin-left: 0px;

}

100% {

left: 100%;

margin-left: -48px;

}

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值