Css链接无法正常工作

时间:2013-11-08 08:04:14

标签: javascript jquery html css

我正在编辑此主题http://themelize.me/demos/curri2.2/index.htm

我想在客户端部分的图像中添加一些网址(索引滑块上有4个图像)

当我通过检查元素添加代码时,例如;

<a href="http://www.google.com"><img src="img/clients/client2.png" alt="Client 2 image" class="img-responsive" draggable="false"></a>
像这样。

光标更改,但链接不起作用。

我想它可以是z-index,并在这个主题样式文件中搜索它,/ theme-style.min.css

发现了4个实例,但无论我改变什么,都没有用。

我该如何解决这个问题?

注意:我也尝试添加到div的链接,但在主题结构中,我认为它重叠,最后的图像逐个消失。

编辑:这是img-responsive类代码,

img-responsive{display:block;height:auto;max-width:100%} It is the default bootstrap setting I think. themelize.me/demos/curri2.2/css/bootstrap.min.css

3 个答案:

答案 0 :(得分:0)

好像你的Slider正在使用flexslider javascrip库。从此link下载最新版本。你有很多api选项,你可以在那里使用。 Demo

或者只需在启动滑块后添加followinf行

    $(window).load(function()
    {
      $('.item a').click(function()
      {
         window.location = $(this).attr('href');
       });    
    });

答案 1 :(得分:0)

这不是CSS问题,而是JavaScript。可能在这些DIV上存在某种preventDefault()。您可以尝试使用链接包装它们,或将DIV更改为(离开class="item"并添加display: block

答案 2 :(得分:0)

试试这个

像这样改变你的结构

<a href="http://www.google.com" class="item" style="width: 250px; float: left; display: block;">
<img class="img-responsive" alt="Client 2 image" src="img/clients/client2.png" draggable="false">
</a>

这工作正常

相关问题