HTML 链接在'Owl Carousel'中不起作用



我正在尝试在我的Magento电子商务网站的主页上使用猫头鹰旋转木马。

但是,我包裹了幻灯片的链接不起作用,甚至不可点击。

在另一个问题中,海报修复了此问题,并说:

我终于弄清楚了!我的DIV在顶部并阻止了链接。我刚刚更改了该div的z索引,链接现在正在起作用。

,但我不明白他到底做了什么。有人可以帮助我吗?滑块的第1部分是:

<div style="padding:29px 0 36px;background-color:#f4f4f4;">
<div class="container">
<div class="slider-with-side">
<div class="slider-area">
<div id="banner-slider-demo-8" class="owl-carousel owl-theme owl-bottom-narrow owl-banner-carousel">
<div class="item">
<a href="{{config path="web/unsecure/base_url"}}index.php/peripheriques/stockage.html"><img src="{{media url="wysiwyg/porto/homepage/slider/08/slide2.jpg"}}" alt="" /></a>
<div class="content" style="position:absolute;width:100%;height:100%;left:0;top:0;">
<div class="ribbon" style="position:absolute;text-align:right;">
<em style="font-weight:300;line-height:1;color:#fff;font-style:normal;">Vos Données En</em>
<h3 style="font-weight:700;line-height:1;color:#fff;">lieux</h3>
<h5 style="font-weight:600;line-height:1;color:#fff;">Sûr!</h5>
</div>
<div class="text-area" style="left:3%;bottom:15%;position:absolute;text-align:left;">
<h2 style="font-weight:600;line-height:1;color:#fff;background-color:#202020;background-color:rgba(23,23,23,.9);">SOLUTIONS <b style="font-weight:800;">DE STOCKAGE</b></h2><br/>
<p style="line-height:1.2;color:#fff;background-color:#444;background-color:rgba(23,23,23,.75);">Une offre vaste et polyvalente pour <b>STOCKEZ, <br/>PROTÉGEZ ET GÉREZ </b>efficacement vos données</p>
</div>              
</div>                      
</div>

第2部分是:

<div class="side-area">
<div class="item1">
<a href="{{config path="web/unsecure/base_url"}}index.php/consommables.html"><img src="{{media url="wysiwyg/porto/homepage/slider/08/right-banner1.jpg"}}" alt="" /></a>
<div class="content">
<em  style="color:#fff;font-weight:400;font-style:italic;line-height:1;">Consommables</em>
<h2 style="color:#fff;font-weight:700;line-height:1;">& Fournitures</h2>
</div>
</div>

滑块布局在左侧有一个大图像,右侧有3个小图像。所有人都有<a href标签,所有这些都不可单击。当我查看页面源时,链接在那里!

我不知道这对到达此页面的其他人有多大帮助,但是我遇到了同样的问题,我在网上阅读的解决方案都没有解决问题,这是我解决问题的方法,也许您也会发现这也有用,即使出现问题的原因是不同的。

首先,我用猫头鹰旋转木马隔离了该部分,以查看它是页面上唯一的东西时是否有效(确实如此)。然后,我添加了标题和页脚并再次进行了测试(仍然有效)。之后,我添加了每个部分,直到轮播链接停止工作。一旦我弄清楚哪个部分引起了问题,我就仔细研究了它,看看是否可以发现任何异常。在这种情况下,我们决定省略的灯箱功能有一些零碎的代码。一旦删除,一切都很好。

最新更新