Anchor links that point to ID of a hidden element will cause browser to automatically show the element and scroll to it when clicked
Anchor links that point to ID of a hidden element will cause browser 开发者_如何转开发to automatically show the element and scroll to it when clicked. I've seen some girl post a demo of this, but I cannot find it anymore. No JavaScript please.
Use an Octothorpe in the href attribute of the anchor element.
<a href="#SomewhereElse">Click here</a>
<div id="SomewhereElse">When you click the browser should scroll here</div>
After some research and tests I have concluded that Mozilla engine doesn't auto-show hidden divs when linked using anchors.
精彩评论