答案 0 :(得分:2)
<div class="trading-img-box">
<a href = "javascript:void(0)" onclick = "document.getElementById('trading6').style.display='block';document.getElementById('body-below-otherpage-small-trading').style.display='none'">
<img class="trading-img" src="img/trading6.png">
**<a>**
<h1 class="trading-h1">Marble</h1>
<p class="trading-p">We set ourselves at the..</p>
</div>
在此框中,您不会关闭锚标记。
还添加:
<p style="height:0; clear:both;"></p>
要确保背景正确包装,可以添加overflow:auto。但是我在歌剧中遇到了问题,有时迫使卷轴。
答案 1 :(得分:1)
由于 trading-img-box <a>
中有关于<div>
Marble
标记而发生这种情况
<div class="trading-img-box">
<a href = "javascript:void(0)" onclick = "document.getElementById('trading6').style.display='block';document.getElementById('body- below-otherpage-small-trading').style.display='none'">
<img class="trading-img" src="img/trading6.png">
<a> <<<<<< ------ Unclosed Anchor Tag
<h1 class="trading-h1">Marble</h1>
<p class="trading-p">We set ourselves at the..</p>
</div>
答案 2 :(得分:0)
将溢出:自动打开到元素#body-below-otherpage-small-trading