单击链接到达锚点,但即使父元素溢出:隐藏它也会滚动不必要地隐藏内容
<style>
div#x
{overflow:hidden;border-bottom:1px red solid;}
div#x > div
{border:1px red solid;padding:10px;float:left;width:33%;box-sizing:border-box;padding-bottom:10000px;margin-bottom:-10000px;}
</style>
<div id="x">
<div><a href="#test">go to</a><br><br>a</div>
<div>a<br><br><br><br>a</div>
<div>a<br><br><br><br><br><br><span id="test">go here</span></div>
</div>
演示:http: //jsfiddle.net/aj8cX/5/
有没有办法解决这种行为?