0

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

我想在客户端部分的图像中添加一些 url(索引滑块上有 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 响应类代码,

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
4

3 回答 3

0

这不是 CSS 问题,而是 JavaScript。preventDefault()这些DIV上可能有某种东西。您可以尝试使用链接包装它们,或将 DIV 更改为 (leave class="item"and add display: block.

于 2013-11-08T08:34:45.377 回答
0

Try this

Change your structure like this

<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>

This working fine

于 2013-11-08T08:43:56.977 回答
0

好像您的 Slider 正在使用 flexslider javascrip 库。从此链接下载最新版本。您可以在那里使用许多 api 选项。演示

或者在您的滑块启动后添加 followinf 行

    $(window).load(function()
    {
      $('.item a').click(function()
      {
         window.location = $(this).attr('href');
       });    
    });
于 2013-11-08T08:30:29.173 回答