N
N
nos43ratu2020-05-19 18:13:14
JavaScript
nos43ratu, 2020-05-19 18:13:14

How to move on anchors when scrolling horizontally on a react site?

I tried to make an application similar to this site in react and tried to rotate the site horizontally and move along the anchors but it did not work out. Can you suggest how to implement it

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
hzzzzl, 2020-05-20
@nos43ratu

I'll put my comment separately in the answers

look at the styles in the browser console, this is NOT a horizontal rewind, but through css the width of the blocks is animated, the page is divided into left / right and at the right time the width of the desired block is substituted

e.g. fast hand with 3 blocks

change the url via history.pushState()
when loading the page, look at the url and add the necessary classes to the blocks (react-router-dom will handle this)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question