无法在滑块顶部单击链接

时间:2013-10-02 11:03:01

标签: html css

我有一个从html和css创建的滑块。我在html编码中添加了一个文本链接以及css,但问题是当我将它放在滑块图像上方时,它无法点击。我尝试使用z-index属性,但徒劳无功。

这是jsfiddle:http://jsfiddle.net/3rvzd/

HTML:             

<!-- radio buttons and labels -->
<input id="select-img-1" name="radio-set-1" type="radio" class="cr-selector-img-1" checked/>
<label for="select-img-1" class="cr-label-img-1">1</label>

<input id="select-img-2" name="radio-set-1" type="radio" class="cr-selector-img-2" />
<label for="select-img-2" class="cr-label-img-2">2</label>

<input id="select-img-3" name="radio-set-1" type="radio" class="cr-selector-img-3" />
<label for="select-img-3" class="cr-label-img-3">3</label>

<input id="select-img-4" name="radio-set-1" type="radio" class="cr-selector-img-4" />
<label for="select-img-4" class="cr-label-img-4">4</label>

<div class="clr"></div> 

<!-- panels -->
<div class="cr-bgimg">
    <div>
        <span>Slice 1 - Image 1</span>
        <span>Slice 1 - Image 2</span>
        <span>Slice 1 - Image 3</span>
        <span>Slice 1 - Image 4</span>
    </div>
    <div>
        <span>Slice 2 - Image 1</span>
        <span>Slice 2 - Image 2</span>
        <span>Slice 2 - Image 3</span>
        <span>Slice 2 - Image 4</span>
    </div>
    <div>
        <span>Slice 3 - Image 1</span>
        <span>Slice 3 - Image 2</span>
        <span>Slice 3 - Image 3</span>
        <span>Slice 3 - Image 4</span>
    </div>
    <div>
        <span>Slice 4 - Image 1</span>
        <span>Slice 4 - Image 2</span>
        <span>Slice 4 - Image 3</span>
        <span>Slice 4 - Image 4</span>
    </div>
</div>

<!-- titles -->
<div class="cr-titles">
    <h3> 
       <span>Surface Pro</span>
        <span>What you've been dreaming of</span>
<a class="sliderlink" href="http://www.google.com">$300</a> 
    </h3>
    <h3>
        <span>Adventure</span>
        <span>Where the fun begins</span>
    </h3>
    <h3>
        <span>Nature</span>
        <span>Unforgettable eperiences</span>
    </h3>
    <h3>
        <span>Serenity</span>
        <span>When silence touches nature</span>
    </h3>
</div>

你能帮帮我吗?

1 个答案:

答案 0 :(得分:1)

你的一个元素是悬停在这个anchor ...

删除以下设置:

.cr-titles h3 {
    z-index: 10000;
}