css3多个,CSS3 多个长方形组成的动画

CSS

语言:

CSSSCSS

确定

@keyframes br {

0% {

border-radius: 0%;

}

100% {

border-radius: 50%;

height: 100vh;

width: 100vw;

}

}

@keyframes rot {

0% {

box-shadow: 0px 0px 0px 0px #ddd;

transform: translate(-50%, -50%) rotate(0deg);

}

50% {

box-shadow: 0px 20px 10vmin -5px #E7C9FD;

}

100% {

box-shadow: 0px 0px 0px 0px #ddd;

transform: translate(-50%, -50%) rotate(720deg);

}

}

.box {

animation: br 5s ease-in-out alternate infinite;

border: 10vmin solid #8CFEDB;

box-sizing: border-box;

height: 50vh;

mix-blend-mode: multiply;

position: absolute;

width: 50vw;

}

.box:before,

.box:after {

animation: rot 5s ease-in-out alternate infinite;

border: inherit;

border-radius: inherit;

content: '';

display: block;

mix-blend-mode: multiply;

position: absolute;

}

.box:before {

border-color: #FFDD9C;

height: calc(100% - 20vmin);

width: calc(100% - 20vmin);

}

.box:after {

animation-delay: 1.25s;

border-color: #FF8484;

height: calc(100% - 30vmin);

width: calc(100% - 30vmin);

}

.middled,

.box,

.box:before,

.box:after {

left: 50%;

top: 50%;

transform: translate(-50%, -50%);

}

body {

background-color: #292A2B;

overflow: hidden;

}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值