web coverflow的html5 源码,使用CSS3实现Coverflow(封面流)效果

CSS

语言:

CSSSCSS

确定

body {

padding: 4em 0;

text-align: center;

background: #f1f1f1;

}

.coverflow {

width: 200px;

height: 200px;

display: inline-block;

position: relative;

}

.coverflow > * {

position: absolute;

top: 0;

left: 0;

width: 200px;

height: 200px;

animation: coverflow 8s ease both infinite;

}

.coverflow :nth-child(2) {

animation-delay: 1s;

}

.coverflow :nth-child(3) {

animation-delay: 2s;

}

.coverflow :nth-child(4) {

animation-delay: 3s;

}

.coverflow :nth-child(5) {

animation-delay: 4s;

}

.coverflow :nth-child(6) {

animation-delay: 5s;

}

.coverflow :nth-child(7) {

animation-delay: 6s;

}

.coverflow :nth-child(8) {

animation-delay: 7s;

}

.coverflow-item {

border-radius: 50%;

border: 5px solid white;

}

@keyframes coverflow {

0%, 5% {

opacity: 0;

transform: translate3d(190px, 0, 0) scale(0.6);

}

12.5%, 17.5% {

opacity: 0.2;

transform: translate3d(170px, 0, 0) scale(0.6);

}

25%, 30% {

opacity: 1;

transform: translate3d(0, 0, 0) scale(1);

}

37.5%, 42.5% {

opacity: 0.2;

transform: translate3d(-170px, 0, 0) scale(0.6);

}

0%, 50% {

opacity: 0;

transform: translate3d(-190px, 0, 0) scale(0.6);

}

100% {

opacity: 0;

transform: translate3d(-190px, 0, 0) scale(0.6);

}

}

/* NO-BEAUTIFY */

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值