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

求源代码呀,怎么敲都

求源代码呀 怎么敲都不对

正在回答

4 回答

当然,你也可以使用我的代码

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>CSS3 创建翻页效果</title>
    <style type="text/css">
        .wrap {
            -webkit-perspective: 800;
            -webkit-perspective-origin: center;
            overflow: hidden;
        }
        
        .wrapContent {
            width: 400px;
            height: 400px;
            margin: 0 auto;
            position: relative;
            -webkit-transform-style: preserve-3d;
        }
        
        .pages {
            width: 400px;
            height: 400px;
            position: absolute;
            top: 0;
            left: 0;
            font-size: 400px;
            font-weight: bold;
            line-height: 400px;
            text-align: center;
            color: #fff;
            background-color: #69e;
            -webkit-transform-origin: bottom;
            -webkit-transform: rotateX(90deg);
            -webkit-transition: -webkit-transform 1s linear;
        }
        
        .page1 {
            -webkit-transform: rotateX(0deg);
        }
        
        .controller {
            margin: 10px auto;
            text-align: center;
        }
        
        .controller span {
            width: 80px;
            height: 30px;
            line-height: 30px;
            border: 1px solid #ccc;
            margin-right: 10px;
            display: inline-block;
            cursor: pointer;
        }
    </style>
</head>
<body>
    <div>
        <div>
            <div class="pages page1">1</div>
            <div class="pages page2">2</div>
            <div class="pages page3">3</div>
            <div class="pages page4">4</div>
            <div class="pages page5">5</div>
            <div class="pages page6">6</div>
        </div>
    </div>
    <div>
        <span id="next" onclick="next();">next</span>
        <span id="previous" onclick="previous();">previous</span>
    </div>
    
    <script type="text/javascript">
        var curIndex =1;
        function next() {
            if(curIndex == 6) {
                return;
            }else {
                var curPage = document.getElementsByClassName("page" + curIndex);
                curPage[0].style.webkitTransform = 'rotateX(-90deg)';
                curIndex ++;
                var nextPage = document.getElementsByClassName("page" + curIndex);
                nextPage[0].style.webkitTransform = 'rotateX(0deg)';
            }
        }
        
        function previous() {
            if(curIndex == 1) {
                return;
            }else {
                var curPage = document.getElementsByClassName("page" + curIndex);
                curPage[0].style.webkitTransform = 'rotateX(90deg)';
                curIndex --;
                var nextPage = document.getElementsByClassName('page' + curIndex);
                nextPage[0].style.webkitTransform = 'rotateX(0deg)';
            }
        }    
    </script>
</body>
</html>


1 回复 有任何疑惑可以回复我~
#1

qq_美丽的曲线_03762593 提问者

非常感谢!
2018-08-24 回复 有任何疑惑可以回复我~

  demo地址->  http://hilij.com/demo/page3D.html

1 回复 有任何疑惑可以回复我~

已经找到了  谢谢亲爱的们

0 回复 有任何疑惑可以回复我~

退回这个课的主页右边有资料下载

2 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

求源代码呀,怎么敲都

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信