css阵列,CSS3 斜向波动的圆点阵列

CSS

语言:

CSSSCSS

确定

html,

body {

height: 100%;

margin: 0;

background: #30283f;

/**

* Also try:

* scale: 1.5,

* size: 10px,

* -

* scale: 75,

* size: 1px

* -

* scale: 10,

* size: 1px

*/

}

.dots {

font-size: 0;

width: 250px;

height: 250px;

position: absolute;

left: 50%;

top: 50%;

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

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

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

}

.dot {

display: inline-block;

width: 10px;

height: 10px;

background: #fff;

border-radius: 50%;

margin: 20px;

}

.dot:nth-child(1) {

background: #d15;

-webkit-animation: scale 0.4s infinite ease alternate;

animation: scale 0.4s infinite ease alternate;

-webkit-animation-delay: -0.13333s;

animation-delay: -0.13333s;

}

.dot:nth-child(2) {

background: #fe0;

-webkit-animation: scale 0.4s infinite ease alternate;

animation: scale 0.4s infinite ease alternate;

-webkit-animation-delay: -0.26667s;

animation-delay: -0.26667s;

}

.dot:nth-child(3) {

background: #f90196;

-webkit-animation: scale 0.4s infinite ease alternate;

animation: scale 0.4s infinite ease alternate;

-webkit-animation-delay: -0.4s;

animation-delay: -0.4s;

}

.dot:nth-child(4) {

background: #0ff;

-webkit-animation: scale 0.4s infinite ease alternate;

animation: scale 0.4s infinite ease alternate;

-webkit-animation-delay: -0.53333s;

animation-delay: -0.53333s;

}

.dot:nth-child(5) {

background: #d15;

-webkit-animation: scale 0.4s infinite ease alternate;

animation: scale 0.4s infinite ease alternate;

-webkit-animation-delay: -0.66667s;

animation-delay: -0.66667s;

}

.dot:nth-child(6) {

background: #0ff;

-webkit-animation: scale 0.4s infinite ease alternate;

animation: scale 0.4s infinite ease alternate;

-webkit-animation-delay: -0.26667s;

animation-delay: -0.26667s;

}

.dot:nth-child(7) {

background: #d15;

-webkit-animation: scale 0.4s infinite ease alternate;

animation: scale 0.4s infinite ease alternate;

-webkit-animation-delay: -0.4s;

animation-delay: -0.4s;

}

.dot:nth-child(8) {

background: #fe0;

-webkit-animation: scale 0.4s infinite ease alternate;

animation: scale 0.4s infinite ease alternate;

-webkit-animation-delay: -0.53333s;

animation-delay: -0.53333s;

}

.dot:nth-child(9) {

background: #f90196;

-webkit-animation: scale 0.4s infinite ease alternate;

animation: scale 0.4s infinite ease alternate;

-webkit-animation-delay: -0.66667s;

animation-delay: -0.66667s;

}

.dot:nth-child(10) {

background: #0ff;

-webkit-animation: scale 0.4s infinite ease alternate;

animation: scale 0.4s infinite ease alternate;

-webkit-animation-delay: -0.8s;

animation-delay: -0.8s;

}

.dot:nth-child(11) {

background: #f90196;

-webkit-animation: scale 0.4s infinite ease alternate;

animation: scale 0.4s infinite ease alternate;

-webkit-animation-delay: -0.4s;

animation-delay: -0.4s;

}

.dot:nth-child(12) {

background: #0ff;

-webkit-animation: scale 0.4s infinite ease alternate;

animation: scale 0.4s infinite ease alternate;

-webkit-animation-delay: -0.53333s;

animation-delay: -0.53333s;

}

.dot:nth-child(13) {

background: #d15;

-webkit-animation: scale 0.4s infinite ease alternate;

animation: scale 0.4s infinite ease alternate;

-webkit-animation-delay: -0.66667s;

animation-delay: -0.66667s;

}

.dot:nth-child(14) {

background: #fe0;

-webkit-animation: scale 0.4s infinite ease alternate;

animation: scale 0.4s infinite ease alternate;

-webkit-animation-delay: -0.8s;

animation-delay: -0.8s;

}

.dot:nth-child(15) {

background: #f90196;

-webkit-animation: scale 0.4s infinite ease alternate;

animation: scale 0.4s infinite ease alternate;

-webkit-animation-delay: -0.93333s;

animation-delay: -0.93333s;

}

.dot:nth-child(16) {

background: #fe0;

-webkit-animation: scale 0.4s infinite ease alternate;

animation: scale 0.4s infinite ease alternate;

-webkit-animation-delay: -0.53333s;

animation-delay: -0.53333s;

}

.dot:nth-child(17) {

background: #f90196;

-webkit-animation: scale 0.4s infinite ease alternate;

animation: scale 0.4s infinite ease alternate;

-webkit-animation-delay: -0.66667s;

animation-delay: -0.66667s;

}

.dot:nth-child(18) {

background: #0ff;

-webkit-animation: scale 0.4s infinite ease alternate;

animation: scale 0.4s infinite ease alternate;

-webkit-animation-delay: -0.8s;

animation-delay: -0.8s;

}

.dot:nth-child(19) {

background: #d15;

-webkit-animation: scale 0.4s infinite ease alternate;

animation: scale 0.4s infinite ease alternate;

-webkit-animation-delay: -0.93333s;

animation-delay: -0.93333s;

}

.dot:nth-child(20) {

background: #fe0;

-webkit-animation: scale 0.4s infinite ease alternate;

animation: scale 0.4s infinite ease alternate;

-webkit-animation-delay: -1.06667s;

animation-delay: -1.06667s;

}

.dot:nth-child(21) {

background: #d15;

-webkit-animation: scale 0.4s infinite ease alternate;

animation: scale 0.4s infinite ease alternate;

-webkit-animation-delay: -0.66667s;

animation-delay: -0.66667s;

}

.dot:nth-child(22) {

background: #fe0;

-webkit-animation: scale 0.4s infinite ease alternate;

animation: scale 0.4s infinite ease alternate;

-webkit-animation-delay: -0.8s;

animation-delay: -0.8s;

}

.dot:nth-child(23) {

background: #f90196;

-webkit-animation: scale 0.4s infinite ease alternate;

animation: scale 0.4s infinite ease alternate;

-webkit-animation-delay: -0.93333s;

animation-delay: -0.93333s;

}

.dot:nth-child(24) {

background: #0ff;

-webkit-animation: scale 0.4s infinite ease alternate;

animation: scale 0.4s infinite ease alternate;

-webkit-animation-delay: -1.06667s;

animation-delay: -1.06667s;

}

.dot:nth-child(25) {

background: #d15;

-webkit-animation: scale 0.4s infinite ease alternate;

animation: scale 0.4s infinite ease alternate;

-webkit-animation-delay: -1.2s;

animation-delay: -1.2s;

}

@-webkit-keyframes scale {

0% {

-webkit-transform: scale(1);

transform: scale(1);

}

20% {

-webkit-transform: scale(1);

transform: scale(1);

}

100% {

-webkit-transform: scale(5);

transform: scale(5);

}

}

@keyframes scale {

0% {

-webkit-transform: scale(1);

transform: scale(1);

}

20% {

-webkit-transform: scale(1);

transform: scale(1);

}

100% {

-webkit-transform: scale(5);

transform: scale(5);

}

}

a {

position: absolute;

left: 50%;

bottom: 5px;

-webkit-transform: translateX(-50%);

-ms-transform: translateX(-50%);

transform: translateX(-50%);

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

text-decoration: none;

font-weight: 700;

font-family: sans-serif;

-webkit-transition: color 0.2s;

transition: color 0.2s;

}

a:hover {

color: #fff;

}

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值