开发者

Anchor links that point to ID of a hidden element will cause browser to automatically show the element and scroll to it when clicked

开发者 https://www.devze.com 2022-12-17 01:02 出处:网络
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 c

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消