zoukankan      html  css  js  c++  java
  • css3图片3D翻转

    .line_3d{
        -webkit-animation-name:y-ain;
        -webkit-animation-duration:5s;
        -webkit-animation-timing-function:ease;
        -webkit-animation-iteration-count:infinite;
        }
           
    @-webkit-keyframes y-ain{
        0%{-webkit-transform:rotateY(0deg);}
        50%{-webkit-transform:rotateY(180deg);}
        100%{-webkit-transform:rotateY(360deg);}
        }
        

    上面是水平翻转(如果把X改成Y 就是垂直翻转)

    .line_3d{
        -webkit-animation-name:y-ain;
        -webkit-animation-duration:5s;
        -webkit-animation-timing-function:ease;
        -webkit-animation-iteration-count:infinite;
        }
        
    .ain_3d{
        -webkit-animation-name:x-ain;
        -webkit-animation-duration:7s;
        -webkit-animation-timing-function:ease-in;
        -webkit-animation-iteration-count:infinite;
        }
        
    @-webkit-keyframes y-ain{
        0%{-webkit-transform:rotateY(0deg);}
        50%{-webkit-transform:rotateY(180deg);}
        100%{-webkit-transform:rotateY(360deg);}
        }
        
    @-webkit-keyframes x-ain{
        0%{-webkit-transform:rotateX(180deg);}
        50%{-webkit-transform:rotateX(0deg);}
        100%{-webkit-transform:rotateX(360deg);}
        }

    上面是同时翻转,即把外层的设为X,里面的设为Y

    <div id="demo_3d" class="ain_3d">
        <div id="img_box_1" class="line_3d">
            <img src="images/show02.jpg" width="300" height="200" />
            <img src="images/show03.jpg" alt="" width="300" height="200" />
            <img src="images/show04.jpg" alt="" width="300" height="200" />
        </div>
    </div>

    上面是结构

    rotate不加X或Y,就是璇转

  • 相关阅读:
    0_Simple__simplePrintf
    0_Simple__simplePitchLinearTexture
    0_Simple__simpleP2P
    0_Simple__simpleOccupancy
    0_Simple__MultiGPU
    0_Simple__simpleMultiCopy
    0_Simple__simpleMPI
    0_Simple__simpleLayeredTexture
    0_Simple__simpleCubemapTexture
    0_Simple__simpleCooperativeGroups
  • 原文地址:https://www.cnblogs.com/lufy/p/2511219.html
Copyright © 2011-2022 走看看