网页图片旋转css码,CSS3图片旋转代码

* {

padding:0;

margin:0;

}

body {

background:#000;

}

.box1 {

position:relative;

width:100%;

margin:0 auto;

}

h1 {

text-align:center;

color:#fff;

}

.zhu {

width:200px;

position:absolute;

top:50px;

left:700px;

}

.zhu a {

font-size:40px;

color:#fff;

text-decoration:none;

letter-spacing:15px;

}

.box2 {

width:200px;

height:300px;

position:relative;

margin:200px auto;

transform-style:preserve-3d;

animation:fn 10s;

animation-iteration-count:infinite;

animation-timing-function:linear;

}

img {

width:300px;

height:400px;

}

.box2 div {

width:200px;

height:300px;

position:absolute;

left:0;

top:0;

}

.box2:hover {

animation-play-state:paused;

}

.img1 {

transform:rotateY(0deg) translateZ(485px);

}

.img2 {

transform:rotateY(40deg) translateZ(485px);

}

.img3 {

transform:rotateY(80deg) translateZ(485px);

}

.img4 {

transform:rotateY(120deg) translateZ(485px);

}

.img5 {

transform:rotateY(160deg) translateZ(485px);

}

.img6 {

transform:rotateY(200deg) translateZ(485px);

}

.img7 {

transform:rotateY(240deg) translateZ(485px);

}

.img8 {

transform:rotateY(280deg) translateZ(485px);

}

.img9 {

transform:rotateY(320deg) translateZ(485px);

}

@keyframes fn {

0% {

transform:rotateX(-15deg) rotateY(0deg);

}

100% {

transform:rotateX(-15deg) rotateY(360deg);

}

}

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值