在1页上索引多个模态

时间:2016-10-28 04:35:35

标签: javascript html css

我有这个代码 单击图片时的图片库,它会打开一个模态 现在我想为每张照片设置不同的模态。我可以索引模态吗?

<div class="row">
    <div class="column1">
        <img src="images/thumbs/img01.JPG" onclick="openModal();currentSlide(1)" class ="hover-shadow">
    </div>
    <div class="column1">
        <img src="images/thumbs/img02.JPG" onclick="openModal();currentSlide(2)" class="hover-shadow">
    </div>
    <div class="column1">
        <img src="images/thumbs/img03.JPG"  onclick="openModal();currentSlide(3)" class="hover-shadow">
    </div>
    <div class="column1">
        <img src="images/thumbs/img04.JPG" onclick="openModal();currentSlide(4)" class="hover-shadow">
    </div>
</div>

0 个答案:

没有答案