Closed yoshi-pi closed 10 months ago
when only top
is specified only positives values make sense, when an element is specified, it becomes a relative position, so the meaning is a bit different. It can seen as an offset of space in pixels needed between the top of the window and the element itself
Reproduction
https://jsfiddle.net/yoshipy/dhnvscf9/11/
Steps to reproduce the bug
Check the position of Hello
Expected behavior
It should scroll 10px above the element #hello because the code is
Actual behavior
It scrolls 10px below the element #hello.
Additional information
No response