N
N
Nikolai2019-07-27 04:48:18
css
Nikolai, 2019-07-27 04:48:18

Why does an anchor cause a page reload?

Good hour! I have a landing page with animations, pictures, etc. On bare html, css, js. I decided to make anchor links for site navigation, but when you click on these anchors leading to the bottom of the page, the entire page reloads. Why? How to fix?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Renat, 2019-07-27
@RenatKZ

There is very little information, we don’t see what you have indicated in href, what is the address of the site itself, perhaps the file you have is index.html, and in href you have indicated /#anchor , then of course there will be reloads, but it’s better to navigate through anchors using JS , make it smooth and beautiful.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question