+ 4
!Solved! Please help...HTML
<a href="#id">Click me</a> This will take u to the #id... But I will not give the auto-scrolling experience... How to do that??
8 odpowiedzi
+ 7
Paste this in css
*{
scroll-behavior:smooth;
}
+ 5
Umm... the values you can use are auto, smooth, initial and inherit
Refer to this
https://www.w3schools.com/cssref/pr_scroll-behavior.asp
+ 3
Can you specify, what you want instead?
+ 2
Remove the href= "#id"
sometimes that stuff makes your code to scroll to the top which can be very annoying ...
you can use onclick = "a_function()"
and then define the function in js
+ 2
JaScript i want that when the link is clicked , the page should scroll to the specific para or division...
But when the tried the given code in the question, it was not looking link it is scrolling...
It is just directing to the location..
I want that we could see the scrolling effect when it is triggered
+ 2
Bartika🎶
please tell me if there are any other attributes that can be added in scroll-behavior.????
Please...
+ 1
Andy[Addict Of Games] this is my idea with first attempt, where I solved this task. At this time you can play with „Contact“ and this 🏠 „Back to the Home Button“:
https://code.sololearn.com/WJqv5tPfKuso/?ref=app
0
don’t use <a> for this situation, use <button>