跑马灯效果(css3,3d变换)
2016-10-31 14:18
405 查看
<!doctype html> <html> <head> <meta charset="utf-8"> <title>无标题文档</title> <script src="http://cdn.bootcss.com/jquery/2.2.4/jquery.min.js"></script> <style type="text/css"> html { width: 100%; height: 100%; } body { width: 100%; height: 100%; background: url(img/bj.jpg) no-repeat; background-size: 100% 100%; } .screen { perspective: 800px; height: 100%; width: 100%; margin-top: 0px; } .direction { transform-style: preserve-3d; transition: all 1s; width: 236px; height: 100px; margin-left: -64px; position: absolute; left: 45%; top: 459px; } .direction img { max-width: 236px; height: 326px; position: absolute; bottom: 0; box-shadow: 0px 10px 24px #000 inset, 0 10px 63px #000; cursor: pointer; border-radius:9px; } .title{ width:300px; height:auto; position:absolute; bottom:140px; left:38%; } .direction img:nth-child(1) { transform: rotateY( 0deg ) translateZ(280.8px); } .direction img:nth-child(2) { transform: rotateY( 60deg ) translateZ(280.8px); } .direction img:nth-child(3) { transform: rotateY( 120deg ) translateZ(280.8px); } .direction img:nth-child(4) { transform: rotateY( 180deg ) translateZ(280.8px); } .direction img:nth-child(5) { transform: rotateY( 240deg ) translateZ(280.8px); } .direction img:nth-child(6) { transform: rotateY( 300deg ) translateZ(280.8px); } </style> </head> <body> <div class="screen" > <div class="direction"> <img src="img/1.jpg"> <img src="img/2.jpg"> <img src="img/3.jpg"> <img src="img/4.jpg"> <img src="img/5.jpg"> <img src="img/6.jpg"> </div> </div> <img class="title" src="img/1.png"> <script> var i=1; $('img').click(function(){ $('.direction').css("transform","rotateY("+60*i+"deg)"); i++; }) </script> </body> </html>
效果:
相关文章推荐
- CSS3 中 3D 变换效果概述
- 用CSS3 Region和3D变换实现书籍翻页效果
- css3中3D变换的景深和灭点
- 纯CSS3制作骰子3D旋转动画效果
- CSS3实现3D效果的弹出框
- 使用 CSS3 实现 3D 图片滑块效果【附源码下载】
- 纯CSS3实现超立体的3D图片侧翻倾斜效果
- HTML5和CSS3实现3D转换效果 CSS3的3D效果
- 用pyplot在坐标系中画图像[制作虚幻效果],这样就可以进行图像变换了,如2d到3d
- 9款非常实用的CSS3和Javascript 3D效果演示
- css3中3D变换的景深和灭点
- 好吧,CSS3 3D transform变换,不过如此!
- css3带阴影效果的3d旋转电影海报特效
- css3 3D动画效果
- css3绘制3d翻页效果
- 饿了么项目---10、(1)css3过渡、变换及3d变换、动画
- HTML5和CSS3实现3D转换效果 CSS3的3D效果
- CSS3实现手机网页3D切换效果
- CSS3 3D旋转rotate效果实例介绍
- CSS3中2D,3D效果