3d方块

来源:互联网 发布:淘宝助理怎么添加模板 编辑:程序博客网 时间:2024/05/20 18:46
   
      
      
      
      
          html,body{
              position:relative;
              height:100%;
           }
          body{
              margin:0;
              padding:0;
           }
          .swiper-container{
              width:300px;
              height:300px;
              position:absolute;
              left:50%;
              top:50%;
              margin-left:-150px;
              margin-top:-150px;
           }
          .swiper-slide{
             background-position:center;
              background-size:cover;
              text-align:center;
              justify-content:center;
              align-items:center;
              display:flex;
           }
      
   
   
      
          
             
3d方块
             
             
             
          
          
      
      
      
           var swiper= new Swiper('.swiper-container',{
             pagination:'.swiper-pagination',
              grabCursor:true,
              effect:'cube',
              cube:{
                 shadow:true,
                 slideShadows:true,
                 shadowOffset:20,
                 shadowScale:0.94
              }
           });
      
   
原创粉丝点击