css阵列,CSS3 色彩变幻的方块阵列

CSS

语言:

CSSSCSS

确定

.frame {

margin: 10px;

}

.box {

background-color: red;

width: 25px;

height: 25px;

position: relative;

display: block;

-webkit-animation: border-animate 30s infinite;

animation: border-animate 30s infinite;

-webkit-animation-timing-function: ease-in-out;

animation-timing-function: ease-in-out;

border-width: 33px;

border-style: solid;

float: left;

margin-right: 10px;

margin-bottom: 10px;

border-color: red;

-webkit-transition: background-color 0.33s ease-in-out;

transition: background-color 0.33s ease-in-out;

}

.box:hover {

background-color: DarkCyan;

}

@-webkit-keyframes border-animate {

0% {

border-color: red;

}

16% {

border-color: orange;

}

32% {

border-color: goldenrod;

}

48% {

border-color: CadetBlue;

}

64% {

border-color: DarkCyan;

}

80% {

border-color: blueviolet;

}

95% {

border-color: purple;

}

100% {

border-color: red;

}

}

@keyframes border-animate {

0% {

border-color: red;

}

16% {

border-color: orange;

}

32% {

border-color: goldenrod;

}

48% {

border-color: CadetBlue;

}

64% {

border-color: DarkCyan;

}

80% {

border-color: blueviolet;

}

95% {

border-color: purple;

}

100% {

border-color: red;

}

}

.box:nth-child(0) {

-webkit-animation-delay: 0s !important;

animation-delay: 0s !important;

}

.box:nth-child(1) {

-webkit-animation-delay: 0.1s !important;

animation-delay: 0.1s !important;

}

.box:nth-child(2) {

-webkit-animation-delay: 0.2s !important;

animation-delay: 0.2s !important;

}

.box:nth-child(3) {

-webkit-animation-delay: 0.3s !important;

animation-delay: 0.3s !important;

}

.box:nth-child(4) {

-webkit-animation-delay: 0.4s !important;

animation-delay: 0.4s !important;

}

.box:nth-child(5) {

-webkit-animation-delay: 0.5s !important;

animation-delay: 0.5s !important;

}

.box:nth-child(6) {

-webkit-animation-delay: 0.6s !important;

animation-delay: 0.6s !important;

}

.box:nth-child(7) {

-webkit-animation-delay: 0.7s !important;

animation-delay: 0.7s !important;

}

.box:nth-child(8) {

-webkit-animation-delay: 0.8s !important;

animation-delay: 0.8s !important;

}

.box:nth-child(9) {

-webkit-animation-delay: 0.9s !important;

animation-delay: 0.9s !important;

}

.box:nth-child(10) {

-webkit-animation-delay: 1s !important;

animation-delay: 1s !important;

}

.box:nth-child(11) {

-webkit-animation-delay: 1.1s !important;

animation-delay: 1.1s !important;

}

.box:nth-child(12) {

-webkit-animation-delay: 1.2s !important;

animation-delay: 1.2s !important;

}

.box:nth-child(13) {

-webkit-animation-delay: 1.3s !important;

animation-delay: 1.3s !important;

}

.box:nth-child(14) {

-webkit-animation-delay: 1.4s !important;

animation-delay: 1.4s !important;

}

.box:nth-child(15) {

-webkit-animation-delay: 1.5s !important;

animation-delay: 1.5s !important;

}

.box:nth-child(16) {

-webkit-animation-delay: 1.6s !important;

animation-delay: 1.6s !important;

}

.box:nth-child(17) {

-webkit-animation-delay: 1.7s !important;

animation-delay: 1.7s !important;

}

.box:nth-child(18) {

-webkit-animation-delay: 1.8s !important;

animation-delay: 1.8s !important;

}

.box:nth-child(19) {

-webkit-animation-delay: 1.9s !important;

animation-delay: 1.9s !important;

}

.box:nth-child(20) {

-webkit-animation-delay: 2s !important;

animation-delay: 2s !important;

}

.box:nth-child(21) {

-webkit-animation-delay: 2.1s !important;

animation-delay: 2.1s !important;

}

.box:nth-child(22) {

-webkit-animation-delay: 2.2s !important;

animation-delay: 2.2s !important;

}

.box:nth-child(23) {

-webkit-animation-delay: 2.3s !important;

animation-delay: 2.3s !important;

}

.box:nth-child(24) {

-webkit-animation-delay: 2.4s !important;

animation-delay: 2.4s !important;

}

.box:nth-child(25) {

-webkit-animation-delay: 2.5s !important;

animation-delay: 2.5s !important;

}

.box:nth-child(26) {

-webkit-animation-delay: 2.6s !important;

animation-delay: 2.6s !important;

}

.box:nth-child(27) {

-webkit-animation-delay: 2.7s !important;

animation-delay: 2.7s !important;

}

.box:nth-child(28) {

-webkit-animation-delay: 2.8s !important;

animation-delay: 2.8s !important;

}

.box:nth-child(29) {

-webkit-animation-delay: 2.9s !important;

animation-delay: 2.9s !important;

}

.box:nth-child(30) {

-webkit-animation-delay: 3s !important;

animation-delay: 3s !important;

}

.box:nth-child(31) {

-webkit-animation-delay: 3.1s !important;

animation-delay: 3.1s !important;

}

.box:nth-child(32) {

-webkit-animation-delay: 3.2s !important;

animation-delay: 3.2s !important;

}

.box:nth-child(33) {

-webkit-animation-delay: 3.3s !important;

animation-delay: 3.3s !important;

}

.box:nth-child(34) {

-webkit-animation-delay: 3.4s !important;

animation-delay: 3.4s !important;

}

.box:nth-child(35) {

-webkit-animation-delay: 3.5s !important;

animation-delay: 3.5s !important;

}

.box:nth-child(36) {

-webkit-animation-delay: 3.6s !important;

animation-delay: 3.6s !important;

}

.box:nth-child(37) {

-webkit-animation-delay: 3.7s !important;

animation-delay: 3.7s !important;

}

.box:nth-child(38) {

-webkit-animation-delay: 3.8s !important;

animation-delay: 3.8s !important;

}

.box:nth-child(39) {

-webkit-animation-delay: 3.9s !important;

animation-delay: 3.9s !important;

}

.box:nth-child(40) {

-webkit-animation-delay: 4s !important;

animation-delay: 4s !important;

}

.box:nth-child(41) {

-webkit-animation-delay: 4.1s !important;

animation-delay: 4.1s !important;

}

.box:nth-child(42) {

-webkit-animation-delay: 4.2s !important;

animation-delay: 4.2s !important;

}

.box:nth-child(43) {

-webkit-animation-delay: 4.3s !important;

animation-delay: 4.3s !important;

}

.box:nth-child(44) {

-webkit-animation-delay: 4.4s !important;

animation-delay: 4.4s !important;

}

.box:nth-child(45) {

-webkit-animation-delay: 4.5s !important;

animation-delay: 4.5s !important;

}

.box:nth-child(46) {

-webkit-animation-delay: 4.6s !important;

animation-delay: 4.6s !important;

}

.box:nth-child(47) {

-webkit-animation-delay: 4.7s !important;

animation-delay: 4.7s !important;

}

.box:nth-child(48) {

-webkit-animation-delay: 4.8s !important;

animation-delay: 4.8s !important;

}

.box:nth-child(49) {

-webkit-animation-delay: 4.9s !important;

animation-delay: 4.9s !important;

}

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值