[英]Iframe in Materialize Carousel Not working
在Materialize Carousel方法而不是普通圖像中,我插入了iframe以將Web鏈接嵌入幻燈片中。 插入iframe時,單擊以切換幻燈片不起作用。
輪播方法:
<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>
非活動幻燈片不可單擊。 單擊時,它們不會被激活。 請幫助我找到解決方案
在iframe的style
屬性中,添加:
pointer-events: none;
在iframe上禁用點擊事件。 這將確保單擊事件正確地冒泡到Materialize Carousel插件。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.