为了账号安全,请及时绑定邮箱和手机立即绑定

<!doctype html>

<html>

<head>

<meta charset="utf-8">

<title>border-radius</title>

<style type="text/css">

.my3d{

    -webkit-perspective:800;

    -webkit-perspective-origin:50% 50%;

 

     overflow:hidden;

    }

.demo{

      width:600px;

      height:600px;

      margin:20px auto;

      border:2px solid blue;

       overflow:hidden;

      }

.group{

    width:400px;

    height:400px;

    background:#9da;

    margin:0 auto;

    overflow:hidden;

     -webkit-transform-style:preserve-3d;

     position:relative; 

}

.page{

    width:360px;

    height:360px;

     font-weight:bold;

    font-size:200px;

    padding:20px;

    text-align:center;

    line-height:360px;

   position:absolute;

   

    

}

#page1{

  -webkit-transform-origin:bottom;

  -webkit-transition:-webkit-transform 1s linear;

  

}

#page2,#page3,#page4,#page5{

  -webkit-transform-origin:bottom;

  -webkit-transition:-webkit-transform 1s linear;

  -webkit-transform:rotateX(90deg);

  

}

#op{

 text-align:center;

 margin:20px auto;

}

</style>

<script type="text/javascript">

var curIndex=1;

    function next(){

        var curPage = document.getElementById("page"+curIndex);

        curPage.style.webkitTransform="rotateX(-90deg)";

        curIndex++;

        var nextPage = document.getElementById("page"+curIndex);

        nextPage.style.webkitTransform="rotateX(0deg)";

    }

    

    

    

</script>

</head>

<body>

<div class="my3d">

<div class="demo">

<div class="group">

<div class="page" id="page1">1</div>

<div class="page" id="page2">2</div>   

<div class="page" id="page3">3</div>   

<div class="page" id="page4">4</div>   

<div class="page" id="page5">5</div>   

</div>

</div>

</div>

<div id="op">

<a href="javascript:next()">next</a>&nbsp:<a href="javascript:prev()">previous</a>    

</div>

</body>

</html>


正在回答

0 回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信