M
M
Max Vyznyuk2015-01-17 16:41:08
css
Max Vyznyuk, 2015-01-17 16:41:08

How to solve parallax problem in chrome?

I was making a page with a parallax effect, and I noticed a strange bug.
If you hold down the left mouse button anywhere in the document, and drag it to the right edge of the viewport, as if we are selecting text, then the whole picture shifts relative to the cursor movement.
I thought that I messed up something in the code, but I checked it on the example of a popular example from Sam Beckham about parallax.
This problem is present only on chrome, since this is not in the developer's mozilla.
For clarity, I will add a video .
Please help me solve this problem.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
SagePtr, 2015-01-17
@thespacemax

Crutch:

$('.parallax').on('scroll', function() {
    this.scrollLeft = 0;
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question