In addition to position:fixed, don’t forget to add padding-top and padding-bottom to the body to eliminate the abnormal display problem of content caused by fixed
Use position:fixed to solve it, and then add padding-top and padding-bottom styles to the body. Otherwise, part of the middle content will be covered by the head and tail.
position:fixed;
In addition to position:fixed, don’t forget to add padding-top and padding-bottom to the body to eliminate the abnormal display problem of content caused by fixed
position:sticky
sticky polyfill: https://github.com/wilddeer/s...
Use position:fixed to solve it, and then add padding-top and padding-bottom styles to the body. Otherwise, part of the middle content will be covered by the head and tail.
position:fixed can solve the problem, but bugs will appear under Android. The perfect solution should be to avoid fixed
Everyone said it was very good and perfect. I came here to learn haha