如果我在HTML页面中有一个非滚动标题,固定在顶部,具有定义的高度:
有没有办法使用URL锚点(#fragment部分)让浏览器滚动到页面中的某一点,但仍然尊重固定元素的高度而没有JavaScript的帮助?
http://foo.com/#bar
WRONG (but the common behavior): CORRECT:
+---------------------------------+ +---------------------------------+
| BAR/ header | | header |
+---------------------------------+ +---------------------------------+
| Here is the rest of the Text | | BAR |
| ... | | |
| ... | | Here is the rest of the Text |
| ... | | ... |
+---------------------------------+ +---------------------------------+