开发者

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜