成都网站建设设计

将想法与焦点和您一起共享

使用JavaScript怎么编写一个旋转木马效果

这篇文章主要介绍了使用JavaScript怎么编写一个旋转木马效果,创新互联小编觉得不错,现在分享给大家,也给大家做个参考,一起跟随创新互联小编来看看吧!

在梅江等地区,都构建了全面的区域性战略布局,加强发展的系统性、市场前瞻性、产品创新能力,以专注、极致的服务理念,为客户提供成都做网站、网站设计 网站设计制作按需网站建设,公司网站建设,企业网站建设,成都品牌网站建设,成都营销网站建设,外贸网站建设,梅江网站建设费用合理。

代码如下:


 
  
 
 CSS3 3D transforms-旋转木马
 
 
   .container {
    width: 210px;
    height: 140px;
    position: relative;
    margin: 50px auto 40px;
    border: 1px solid #CCC;
    -webkit-perspective: 1100px;
     -moz-perspective: 1100px;
      -o-perspective: 1100px;
        perspective: 1100px;
   }
   #carousel {
    width: 100%;
    height: 100%;
    position: absolute;
    -webkit-transform-style: preserve-3d;
     -moz-transform-style: preserve-3d;
      -o-transform-style: preserve-3d;
        transform-style: preserve-3d;
   }
   .ready #carousel {
    -webkit-transition: -webkit-transform 1s;
     -moz-transition: -moz-transform 1s;
      -o-transition: -o-transform 1s;
        transition: transform 1s;
   }
   #carousel.panels-backface-invisible figure {
    -webkit-backface-visibility: hidden;
     -moz-backface-visibility: hidden;
      -o-backface-visibility: hidden;
        backface-visibility: hidden;
   }
   #carousel figure {
    display: block;
    position: absolute;
    width: 186px;
    height: 116px;
    left: 10px;
    top: 10px;
    border: 2px solid black;
    line-height: 116px;
    font-size: 80px;
    font-weight: bold;
    color: white;
    text-align: center;
   }
   .ready #carousel figure {
    -webkit-transition: opacity 1s, -webkit-transform 1s;
     -moz-transition: opacity 1s, -moz-transform 1s;
      -o-transition: opacity 1s, -o-transform 1s;
        transition: opacity 1s, transform 1s;
   }
 #options{
  margin-top: 200px;
  width: 100%;
  text-align: center;
 }
 #options button{padding: 0.5em 1.5em;border: 2px solid #6699cc;background: #fff;}
  
 

 
   
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
   
         

    个数         

        上一页     下一页    

   

    横竖切换    

   

    背面可见切换    

    
     对不起,你的浏览器不支持CSS 3D transforms。

以上就是创新互联小编为大家收集整理的使用JavaScript怎么编写一个旋转木马效果,如何觉得创新互联网站的内容还不错,欢迎将创新互联网站推荐给身边好友。


网页标题:使用JavaScript怎么编写一个旋转木马效果
文章分享:http://chengdu.cdxwcx.cn/article/pjgpei.html

其他资讯