+ 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??

2nd Nov 2020, 11:33 AM
ANDY тнє CODER [RECODE]
ANDY тнє CODER [RECODE] - avatar
8 odpowiedzi
+ 7
Paste this in css *{ scroll-behavior:smooth; }
2nd Nov 2020, 12:36 PM
Bartika🎶
Bartika🎶 - avatar
+ 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
2nd Nov 2020, 1:00 PM
Bartika🎶
Bartika🎶 - avatar
+ 3
Can you specify, what you want instead?
2nd Nov 2020, 11:52 AM
JaScript
JaScript - avatar
+ 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
2nd Nov 2020, 11:49 AM
LIONEL
LIONEL - avatar
+ 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
2nd Nov 2020, 12:33 PM
ANDY тнє CODER [RECODE]
ANDY тнє CODER [RECODE] - avatar
+ 2
Bartika🎶 please tell me if there are any other attributes that can be added in scroll-behavior.???? Please...
2nd Nov 2020, 12:49 PM
ANDY тнє CODER [RECODE]
ANDY тнє CODER [RECODE] - avatar
+ 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
2nd Nov 2020, 10:38 PM
JaScript
JaScript - avatar
0
don’t use <a> for this situation, use <button>
3rd Nov 2020, 10:37 PM
CDP3TIO
CDP3TIO - avatar