There are settings in the HTML
In other words, "a small piece of button" (the predecessors should be very common)
Use the a herf="#id"
anchor point to move the page, but clicking on the link anchor will take the page to "top", meaning that a part will be covered by the "header" part.
How do I move down the anchor point?
Almost like this.
http://segmentfault.com/q/1010000000124208
However, my div ID is generated and of course I have tried some JS
$(function(){ if(location.hash){ var target = $(location.hash); if(target.length==1){ var top = target.offset().top-100; if(top > 0){ $('html,body').animate({scrollTop:top}, 1000); } }
Seeking Big Anext
1201 Modify HMTL as follows
- The world system is my rotten.
- 36588 system
- Other systems
天下系統我最爛
Reply content:
There are settings in the HTML
In other words, "a small piece of button" (the predecessors should be very common)
Use the a herf="#id"
anchor point to move the page, but clicking on the link anchor will take the page to "top", meaning that a part will be covered by the "header" part.
How do I move down the anchor point?
Almost like this.
http://segmentfault.com/q/1010000000124208
However, my div ID is generated and of course I have tried some JS
$(function(){ if(location.hash){ var target = $(location.hash); if(target.length==1){ var top = target.offset().top-100; if(top > 0){ $('html,body').animate({scrollTop:top}, 1000); } }
Seeking Big Anext
1201 Modify HMTL as follows
- The world system is my rotten.
- 36588 system
- Other systems
天下系統我最爛
If you want to offset to the following, you should only use JS it.
Looked at the first floor of the friend's method, the style of his span tag changed a bit,
.placeholder{display:block; width:100px; height:50px; margin-top:-50px; }
Without the implementation of JS.
Welcome to adopt.
The position:absolute;
position of the anchor point is changed using the method of leaving the document flow without affecting the presentation.
http://jsbin.com/teqisuve/5/
PS. Adoption of the downstairs update
Do not jump to the element you want, set an empty element above it, and jump to that