css3云彩飘动,用纯CSS3构造的云彩漂浮动画

CSS

语言:

CSSSCSS

确定

body {

background: -webkit-linear-gradient(#add8e6, #ffffff);

background: -o-linear-gradient(#add8e6, #ffffff);

background: -moz-linear-gradient(#add8e6, #ffffff);

background: linear-gradient(#add8e6, #ffffff);

overflow: hidden;

min-height: 500px;

}

div {

position: absolute;

top: 0px;

width: 250px;

height: 200px;

background: -webkit-linear-gradient(#ffffff, #808080);

background: -o-linear-gradient(#ffffff, #808080);

background: -moz-linear-gradient(#ffffff, #808080);

background: linear-gradient(#ffffff, #808080);

border-radius: 100%;

opacity: 0;

filter: blur(20px);

-webkit-filter: blur(20px);

}

div::before,

div::after {

position: relative;

width: 150px;

height: 100px;

content: " ";

display: block;

left: -80px;

top: 100px;

border-radius: 100%;

background: -webkit-linear-gradient(#ffffff, #808080);

background: -o-linear-gradient(#ffffff, #808080);

background: -moz-linear-gradient(#ffffff, #808080);

background: linear-gradient(#ffffff, #808080);

}

div::after {

left: 200px;

height: 80px;

top: -50px;

}

div:nth-child(1) {

animation: moving 31s;

animation-iteration-coint: infinite;

animation-timing-function: linear;

-webkit-animation: moving 31s;

-webkit-animation-iteration-count: infinite;

-webkit-animation-timing-function: linear;

left: 175px;

top: 20px;

}

div:nth-child(2) {

animation: moving 25s;

animation-iteration-coint: infinite;

animation-timing-function: linear;

-webkit-animation: moving 25s;

-webkit-animation-iteration-count: infinite;

-webkit-animation-timing-function: linear;

left: 100px;

top: 20px;

}

div:nth-child(3) {

animation: moving 28s;

animation-iteration-coint: infinite;

animation-timing-function: linear;

-webkit-animation: moving 28s;

-webkit-animation-iteration-count: infinite;

-webkit-animation-timing-function: linear;

left: 150px;

top: 130px;

}

div:nth-child(4) {

animation: moving 20s;

animation-iteration-coint: infinite;

animation-timing-function: linear;

-webkit-animation: moving 20s;

-webkit-animation-iteration-count: infinite;

-webkit-animation-timing-function: linear;

left: 200px;

top: 100px;

}

div:nth-child(5) {

animation: moving 27s;

animation-iteration-coint: infinite;

animation-timing-function: linear;

-webkit-animation: moving 27s;

-webkit-animation-iteration-count: infinite;

-webkit-animation-timing-function: linear;

left: 125px;

top: 50px;

}

div:nth-child(6) {

animation: moving 22s;

animation-iteration-coint: infinite;

animation-timing-function: linear;

-webkit-animation: moving 22s;

-webkit-animation-iteration-count: infinite;

-webkit-animation-timing-function: linear;

left: 150px;

top: 50px;

}

div:nth-child(7) {

animation: moving 28s;

animation-iteration-coint: infinite;

animation-timing-function: linear;

-webkit-animation: moving 28s;

-webkit-animation-iteration-count: infinite;

-webkit-animation-timing-function: linear;

left: 225px;

top: 75px;

}

div:nth-child(8) {

animation: moving 30s;

animation-iteration-coint: infinite;

animation-timing-function: linear;

-webkit-animation: moving 30s;

-webkit-animation-iteration-count: infinite;

-webkit-animation-timing-function: linear;

left: 505px;

top: 60px;

}

div:nth-child(9) {

animation: moving 25s;

animation-iteration-coint: infinite;

animation-timing-function: linear;

-webkit-animation: moving 25s;

-webkit-animation-iteration-count: infinite;

-webkit-animation-timing-function: linear;

left: 375px;

top: 140px;

}

div:nth-child(10) {

animation: moving 23s;

animation-iteration-coint: infinite;

animation-timing-function: linear;

-webkit-animation: moving 23s;

-webkit-animation-iteration-count: infinite;

-webkit-animation-timing-function: linear;

left: 525px;

top: 70px;

}

div:nth-child(11) {

animation: moving 22s;

animation-iteration-coint: infinite;

animation-timing-function: linear;

-webkit-animation: moving 22s;

-webkit-animation-iteration-count: infinite;

-webkit-animation-timing-function: linear;

left: 375px;

top: 50px;

}

div:nth-child(12) {

animation: moving 25s;

animation-iteration-coint: infinite;

animation-timing-function: linear;

-webkit-animation: moving 25s;

-webkit-animation-iteration-count: infinite;

-webkit-animation-timing-function: linear;

left: 275px;

top: 60px;

}

@-webkit-keyframes moving {

0% {

margin-left: 0%;

opacity: 0;

}

10% {

opacity: 1;

}

100% {

margin-left: 100%;

}

}

@keyframes moving {

0% {

margin-left: 0%;

opacity: 0;

}

10% {

opacity: 1;

}

100% {

margin-left: 100%;

}

}

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值