css情景动画,CSS3 白天/黑夜场景轮回动画

CSS

语言:

CSSSCSS

确定

html {

height: 100%;

}

body {

overflow: hidden;

-webkit-animation: dn 10s;

-webkit-animation-iteration-count: infinite;

-webkit-animation-timing-function: linear;

animation: dn 10s;

animation-iteration-count: infinite;

animation-timing-function: linear;

}

div {

position: absolute;

left: calc(50% - 750px);

top: 85%;

width: 1500px;

height: 1500px;

background-color: silver;

opacity: 1;

-webkit-animation: rotate 10s;

-webkit-animation-iteration-count: infinite;

-webkit-animation-timing-function: linear;

animation: rotate 10s;

animation-iteration-count: infinite;

animation-timing-function: linear;

border: 1px solid white;

border-width: 50px 0px;

border-radius: 200px;

}

div::after,

div::before {

content: " ";

position: absolute;

width: 1500px;

height: 1500px;

background-color: green;

transform: rotate(30deg);

border-radius: 550px;

border: 1px solid #060;

border-width: 0px 50px;

}

div::before {

background-color: #469a3d;

border-color: green;

transform: rotate(60deg);

border-radius: 400px;

}

div div {

left: -150px;

top: -150px;

height: 100px;

width: 100px;

border-radius: 10px;

background-color: yellow;

border: 0;

}

div div::after,

div div::before {

background-color: yellow;

height: 100px;

width: 100px;

border-radius: 10px;

border: 0;

}

@keyframes rotate {

0% {

transform: rotate(1deg);

}

30% {

opacity: 1;

}

45% {

opacity: 0.2;

}

50% {

transform: rotate(180deg);

}

75% {

opacity: 0.2;

}

100% {

transform: rotate(360deg);

}

}

@-webkit-keyframes rotate {

0% {

transform: rotate(1deg);

}

30% {

opacity: 1;

}

45% {

opacity: 0.2;

}

50% {

transform: rotate(180deg);

}

75% {

opacity: 0.2;

}

100% {

transform: rotate(360deg);

}

}

@keyframes dn {

0% {

background-color: #f4d9e7;

}

20% {

background-color: lightblue;

}

40% {

background-color: #300030;

}

43%,

80% {

background-color: black;

}

100% {

background-color: #f4d9e7;

}

}

@-webkit-keyframes dn {

0% {

background-color: #f4d9e7;

}

20% {

background-color: lightblue;

}

40% {

background-color: #300030;

}

43%,

80% {

background-color: black;

}

100% {

background-color: #f4d9e7;

}

}

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值