<a> tag overflows </a> <div> <a>

时间:2018-06-21 11:11:02

标签: html overflow anchor

On a webpage I am using PhotoSwipe to create an image gallery which works very well. Each thumbnail image (SMALL.jpg) on click open ups the gallery showing the BIG.jpg. To work properly PhotoSwipe requires data-size as attribute carrying the actual BIG.jpg size ("2500x1875").

Until here all fine.

I am now trying to add a new div (noPSWP) under each thumbnail image which should not launch PhotoSwipe. I tried many solutions - however the only which works is to get rid off the attribute data-size...which appears to be incompatible with PhotoSwipe...

Can you help me?

PS: div class launchPSWP appears to be irrilevant

PPS: tag a CSS sets display: inline-block; width:100%; height:100%; max-width: 100%;

<div class="thumbnail">
  <div class="launchPSWP">
    <figure>
      <a href="BIG.jpg" data-size="2500x1875">
      <img src="SMALL.jpg">
      </a>
    </figure>
  </div>
  <div class="noPSWP" style="pointer-events:none"> Shoudl not open PhotoSwipe
  </div>
</div>

1 个答案:

答案 0 :(得分:0)

已解决,问题出在Jquery中,它捕获了单击启动的PhotoSwipe,它在div上而不是在图上。