8. 12. 2023

Fixed background jamming in IE 11

Thanks to the CSS declaration & nbsp; background-attachment: fixed & nbsp; it is possible to “fix” the background of a given element during scrolling in a very simple way and thus achieve a kind of parallax effect. Everything works beautifully and easily, except for & nbsp; Internet Explorer 11 .

However, you may encounter a bug / unwanted behavior in Internet Explorer version 11. Here, when scrolling, the background image does not move smoothly, as in other browsers, and the pseudo-parallax effect does not look nice at all. Unlike other browsers, scrolling takes place here in leaps and bounds, and in the end it all looks “stuck”.

Fortunately, there is a simple Javascript solution to achieve smooth scrolling in IE 11, and the whole problem with a fixed background is solved:

Automatic translation

This is an automatic translation of the original article in Czech.


Leave a Reply

Your email address will not be published. Required fields are marked *