HTML/CSS - 链接无效

标签 html css z-index webkit-animation

我有一个使用 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;
}

最佳答案

试一试它是有效的

更改关键帧 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;}
        }

这是更新的 fiddle http://jsfiddle.net/LGbbf/3/

希望对你有帮助:)

关于HTML/CSS - 链接无效,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21520451/

相关文章:

html - 使图像在单击时打开模态?

javascript - JS 将行添加到表中。行出现然后消失

css - Twitter Bootstrap - 导航和媒体查询 - 链接对齐

javascript - Bootstrap 选择在 jquery pep 中不起作用

css - 转换和堆叠顺序

css - 将元素隐藏在 ImageMap 后面

html - CSS:背景大小:封面; Firefox18 中的奇怪行为 - 它附加到父绝对定位元素的父相对定位元素

javascript - 在 javascript 中将样式表添加到 html 中不起作用

html - 打印页面,右侧文本被截断

html - 由于 div 重叠,无法单击链接