让我的翻转 div 响应



我使用Quick Flip 2创建了一个应用程序。

这是我的代码:

<div class="quickFlip">
    <div id="imgContainer" class="blackPanel">               
        <center>
            <input id="click_flip" type="button" class="quickFlipCta" value="Flip to see the Answer" >
        </center>
    </div>
    <div id="b" class="redPanel">
        <!-- <h4>A plugin for jQuery</h4>
        <p><em>By Jon Raasch</em></p> -->
        <center>
            <input id="flip_again" class="first quickFlipCta" type="button" value="Flip Again" >
        </center>
        <center>
            <input id="shownext" type="button" value="Show Next" >
        </center>
    </div>
</div>

我希望我的div 与类 quickFlip 变得响应迅速。

这是我的 CSS

body {
    min-width: 1280px;
}
.quickFlip, .quickFlip3 {
    height: 480px;
    width: 800px;
}
.quickFlip2 {
    height: 100%;
    width: 100%;
    float: left;
    margin-right: 10%;
}
/* the rest of this is irrelevent */
H1, H2 {
    float: left;
    padding-right: 15px;
    line-height: 32px;
}
.clear {
    clear: both;
    magin: 0;
    padding: 0;
}
.redPanel, .blackPanel {
    text-align: center;
}
.half-col {
    width: 50%;
    float: left;
}
/**** panels ****/
.quickFlip, .quickFlip2, .quickFlip3 {
    font-family: "Trebuchet MS", Verdana, Sans-serif, sans;
    font-size: 13px;
    position: relative;
}
.quickFlip .blackPanel, .quickFlip2 .blackPanel, .quickFlip3 .blackPanel {
    background-color: #FFD993;
    color: darkbrown;
    border: 1px outset #A61C14;
    -moz-border-radius: 8px;
    -webkit-border-radius: 8px;
}
.quickFlip .redPanel, .quickFlip2 .redPanel, .quickFlip3 .redPanel {
    background-color: #75941f;
    color: #FFF;
    border: 1px outset #4f6417;
    -moz-border-radius: 8px;
    -webkit-border-radius: 8px;
}
.half-col p {
    padding: 5px;
    margin:0 30px 10px 30px;
}
.half-col p.panel-content {
    text-align: left;
    margin-top: 10px;
}
.half-col h3, .half-col h4 {
    padding: 0;
    margin: 0 35px;
}
.half-col h3 {
    text-align: left;
    font-size:24px;
    line-height:24px;
}
.half-col .redPanel h3 {
    text-align: center;
    margin-bottom: 10px;
}
.half-col .first {
    margin-top: 30px;
}
.half-col EM {
    display: block;
    padding: 0;
}
.half-col A.quickFlipCta {
    position: absolute;
    bottom: 30px;
    left: 65px;
    width: 210px;
    font-size: 15px;
    outline: none;
}
.quickFlip2 .redPanel a {
    color: #FFF;
}
.quickFlipCta {
    cursor: pointer;
}

这是我的JS代码

<script type="text/javascript">
$(function() {
    $('.quickFlip').quickFlip();
    $('.quickFlip3').quickFlip({
        vertical : true
    });
    $('.quickFlip2').quickFlip();
});
</script>

我应该做哪些更改

在".quickFlip"中添加100%宽度并从正文中删除最小宽度。

.quickFlip{
    height: 480px;
    width: 100%;
}

你的js代码在哪里?您是否添加了:

$(function() {
    $('.quickFlip').quickFlip();
});

还是完全不见了?

编辑:

http://jsfiddle.net/Hhrr9/

正在处理它

最新更新