In Materialize Carousel method instead of normal images, I have inserted Iframe to embed a web link in slides. On inserting Iframes, clicking to switch slide doesn't work.
在Materialise Carousel方法而不是普通图像中,我插入了Iframe以在幻灯片中嵌入Web链接。在插入Iframe时,单击以切换幻灯片不起作用。
Carousel Method:
<div class="carousel">
<a class="carousel-item"> <iframe style=' max-height: 700px; max-width: 420px; width: 340px; height: 566px;' src='http://www.website.com' frameborder='0' allowfullscreen scrolling='no'></iframe></a>
<a class="carousel-item"> <iframe style=' max-height: 700px; max-width: 420px; width: 340px; height: 566px;' src='http://www.website.com' frameborder='0' allowfullscreen scrolling='no'></iframe></a>
<a class="carousel-item"> <iframe style=' max-height: 700px; max-width: 420px; width: 340px; height: 566px;' src='http://www.website.com' frameborder='0' allowfullscreen scrolling='no'></iframe></a>
<a class="carousel-item"> <iframe style=' max-height: 700px; max-width: 420px; width: 340px; height: 566px;' src='http://www.website.com' frameborder='0' allowfullscreen scrolling='no'></iframe></a>
</div>
The non active slides are not clickable. On clicking, they don't get activated. Kindly help me find a solution
非活动幻灯片不可点击。点击后,它们不会被激活。请帮我找到解决方案
1 个解决方案
#1
2
In the iframe's style
attribute, add:
在iframe的样式属性中,添加:
pointer-events: none;
to disable click events on the iframe. This will make sure click events correctly bubble up to the Materialize Carousel plugin.
禁用iframe上的点击事件。这将确保点击事件正确冒泡到Materialise Carousel插件。
#1
2
In the iframe's style
attribute, add:
在iframe的样式属性中,添加:
pointer-events: none;
to disable click events on the iframe. This will make sure click events correctly bubble up to the Materialize Carousel plugin.
禁用iframe上的点击事件。这将确保点击事件正确冒泡到Materialise Carousel插件。