scroll to a certain point in the page automatically using css
-
26-10-2019 - |
سؤال
Is there a css parameter I can give to the body element that tells it to scroll to a certain point by default? For example, something like:
body {
default-scroll-y: 200px;
}
If not, is there another way I can describe scrolling distances as heights in css?
المحلول
There is no way in CSS.
You could trigger it with JavaScript/jQuery.
You could either use a plugin for that:
Or implement it on your own, which would not be to hard I guess.
لا تنتمي إلى StackOverflow