:) 我使用nivo滑块,现在一切都很好。我唯一的问题是,只要我点击视频打开img滑块,第一个img出现两次。 我只想看一次img。我想知道天气img出现两次因为当滑块打开然后它被称为第一个img时出现。然后我如何调用secound img来接下来呢? 很多帮助.. 这是我正在谈论的代码。
<div class="col-lg-4 col-sm-4 col-xs-6">
<a title="Image 1"href="Figuren-Bilder/Marilyn/1.jpg" data-lightbox-gallery="galleryvid1">
<video class="thumbnail img-responsive active" src="Figuren-Filme/Marilyn.webm" id="id0" width="320" onMouseOver="this.play()" onMouseOut="this.pause()" muted loop >
</video>
<div class=""><p>Marilyn, "Der Tod und das Mädchen", Bronzeguss, XX cm</p></a></div>
<a title="Image 2"href="Figuren-Bilder/Marilyn/1.jpg" class="gallery-thumb-hidden" data-lightbox-gallery="galleryvid1"></a>
<a title="Image 3"href="Figuren-Bilder/Marilyn/1.jpg" class="gallery-thumb-hidden" data-lightbox-gallery="galleryvid1"></a>
<a title="Image 4"href="Figuren-Bilder/Marilyn/1.jpg" class="gallery-thumb-hidden" data-lightbox-gallery="galleryvid1"></a>
</div>
答案 0 :(得分:1)
你的标记有误。在内部打开时,您正在div
之外关闭a
。
大多数浏览器都会尝试更正无效的HTML。这可能会导致出现意外结果,就像您在滑块上看到的一样。
正确的标记应该是:
<div class="col-lg-4 col-sm-4 col-xs-6">
<a title="Image 1"href="Figuren-Bilder/Marilyn/1.jpg" data-lightbox-gallery="galleryvid1">
<video class="thumbnail img-responsive active" src="Figuren-Filme/Marilyn.webm" id="id0" width="320" onMouseOver="this.play()" onMouseOut="this.pause()" muted loop ></video>
<div class="">
<p>Marilyn, "Der Tod und das Mädchen", Bronzeguss, XX cm</p>
</div>
</a>
<a title="Image 2"href="Figuren-Bilder/Marilyn/1.jpg" class="gallery-thumb-hidden" data-lightbox-gallery="galleryvid1"></a>
<a title="Image 3"href="Figuren-Bilder/Marilyn/1.jpg" class="gallery-thumb-hidden" data-lightbox-gallery="galleryvid1"></a>
<a title="Image 4"href="Figuren-Bilder/Marilyn/1.jpg" class="gallery-thumb-hidden" data-lightbox-gallery="galleryvid1"></a>
</div>