如果我的div
超過了我的image tag
,如何通過div
訪問圖像?我的意思是,當我右鍵單擊該div有像open image in new tab
等圖像標記等選項,或者甚至左鍵單擊以訪問該圖像,但該div應該可見..如何通過div訪問圖像
我有類似於:
CSS
myDiv {
position: absolute;
top : 0;
left: 0;
width: 100%;
height: 100%;
}
HTML
<div>
<img src="..." alt="..">
<div id="myDiv"></div>
</div>
PS:我看到某種收藏夾過的圖像縮放圖標,但按右鍵或其他行動我有權訪問圖像,而不是覆蓋div,如預期。
你的問題是什麼呢? –
看到這個:[HTML「覆蓋」,它允許點擊落在它後面的元素](http://stackoverflow.com/questions/1401658/html-overlay-which-allows-clicks-to-fall-through-to -elements-behind-it) – Anujith