在IE中,bootstrap-flip-card-with-css3-transform无法正常工作

时间:2016-09-29 18:58:33

标签: jquery html css twitter-bootstrap css3

当我点击前面的div时,后面的div必须翻转。但这里的问题是当我点击前面的div时,它被翻转并显示前面div的反向视图。后部div没有显示。我无法找到问题,为什么它表现得像这样。

代码: -

    <!DOCTYPE html>
<html lang="en">
<head>    
    <link rel="stylesheet" href="../../css/bootstrap.css">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
    <script src="../../js/bootstrap.js"></script>
    <style>
        .flip {
            -webkit-perspective: 800;
            perspective: 800;

            position: relative;

        }
        .flip .card.flipped {
            -webkit-transform: rotatex(-180deg);
            transform: rotatex(-180deg);
        }
        .flip .card {

            height: 100%;
            -webkit-transform-style: preserve-3d;
            -webkit-transition: 0.5s;
            transform-style: preserve-3d;
            transition: 0.5s;
        }
        .flip .card .face {

            -webkit-backface-visibility: hidden ;
            backface-visibility: hidden ;
            z-index: 2;

        }
        .flip .card .front {
            position: absolute;
            width: 100%;
            z-index: 1;

        }
        .flip .card .back {
            -webkit-transform: rotatex(-180deg);
            transform: rotatex(-180deg);
        }
        .inner{margin:0px !important;}
    </style>
</head>
<body>
    <!-- Flip view -->
    <div class="flip">
        <div class="card">
            <div class="face front">
                <div class="well well-sm inner"> Front</div>
            </div>
            <div class="face back">
                <div class="well well-sm inner"> Back</div>
            </div>
        </div>
    </div>
</body>
<script>
    $('.flip').click(function(){
        $(this).find('.card').toggleClass('flipped');
    });
</script>

0 个答案:

没有答案