4

Webkit アニメーションと CSS を使用して回転カルーセルを作成しました。カルーセルの下に 3 つのアイテムがあり、各アイテムには写真とテキストの宣伝文句があります。テキストを3つの異なるリンクにリンクしようとしています。

現在、3 つのテキスト ボックスはすべて同じリンク (最後のリンク) にリンクされています。z-index と何か関係があるのではないかと感じていますが、よくわかりません。すべてのコードを jsfiddle に入れました。

http://jsfiddle.net/LGbbf/1/

どんな助けでも大歓迎です!

関連する HTML コード

<div class="gallery-area">
    <ul>
        <li>
            <div class="img"><img alt="" width="765" height="323" src="http://app.msf.gov.sg/Portals/0/Files/IYF/IYF-Family-Treasures.jpg" /> </div>
            <div class="txt-box">
                <p><a href="http://app.msf.gov.sg/IYFNewsBuzz.aspx">Send in a photo of your family, friends and neighbours enjoying the Chinese New Year festivities and stand to WIN a $400 IKEA Gift Card ANG BAO! <img alt="" width="6" height="10" src="http://app.msf.gov.sg/Portals/0/Files/IYF/img-arrow.png" /></a></p>
            </div>
        </li>
        <li>
            <div class="img"><img alt="" width="765" height="323" src="http://app.msf.gov.sg/Portals/0/Files/IYF/cny.png" /> </div>
            <div class="txt-box">
                <p><a href="http://app.msf.gov.sg/IYFEvents.aspx">Chinese New Year is a time when families get together to celebrate. Check out the events where you and your family can celebrate during this festive period. <img alt="" width="6" height="10" src="http://app.msf.gov.sg/Portals/0/Files/IYF/img-arrow.png" /></a></p>
            </div>
        </li>
        <li>
            <div class="img"><img alt="" width="765" height="323" src="http://app.msf.gov.sg/Portals/0/Files/IYF/AboutIYF_carousel_ver4.png" /> </div>
            <div class="txt-box">
                <p><a href="http://app.msf.gov.sg/AboutIYF2014.aspx">2014 is the International Year of the Family. We invite all to join us in the spirit of love and respect, commitment and big-heartedness. <img alt="" width="6" height="10" src="http://app.msf.gov.sg/Portals/0/Files/IYF/img-arrow.png" /></a></p>
            </div>
        </li>
    </ul>
</div>

関連する CSS コード

.info-img-box {
    box-shadow:0 9px 6px -6px #929292;
    -webkit-box-shadow:0 9px 6px -6px #929292;
    overflow:hidden;
    position:relative;
    margin:0 0 32px;
}
.info-img-box img {
    vertical-align:top;
}
.info-img-box .txt-box {
    position:absolute;
    bottom:0;
    left:0;
    width:100%;
    background:url(http://app.msf.gov.sg/Portals/0/Files/IYF/bg-txt-box-img.png);
    padding:8px 0 10px;
}
.info-img-box .txt-box img{
    vertical-align:middle;
}
.info-img-box .txt-box p {
    margin:0 13px;
    font:13px/16px "Lato", Arial, Helvetica, sans-serif;
}
.info-img-box .txt-box a {
    color:#fff;
    text-decoration:none;
}
.info-img-box .txt-box a:hover {
    text-decoration:underline;
}
.quote-area:after {
    content:"";
    clear:both;
    display:block;
}
4

1 に答える 1

2

これを試してみてください

キーフレームCSSを変更

CSS:

        @-webkit-keyframes round{
        0%{opacity:1; z-index:1111}
        27%{opacity:1; z-index:1111;}
        33%{opacity:0; z-index:0;}
        94%{opacity:0; z-index:0;}
        100%{opacity:1; z-index:1111;}
        }
        @keyframes round{
        0%{opacity:1; z-index:1111}
        27%{opacity:1; z-index:1111;}
        33%{opacity:0; z-index:0;}
        94%{opacity:0; z-index:0;}
        100%{opacity:1; z-index:1111;}
        }

これが更新されたフィドルhttp://jsfiddle.net/LGbbf/3/です

それがあなたを助けることを願っています:)

于 2014-02-03T06:10:12.410 に答える