Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

background-attachment: fixed; is not working in firefox

here is my site https://charles-keally.myshopify.com/ Its been a whole day fixing the parallax image. The last image show parallax in chrome but not in mozilla. Please somebody help me. I'm using debut theme. All I did is just add background-attachment:fixed; in hero.liquid Anyone please help me Thanks

like image 815
yousaf Avatar asked Jul 06 '18 13:07

yousaf


People also ask

What does background-attachment fixed mean?

The background-attachment CSS property sets whether a background image's position is fixed within the viewport, or scrolls with its containing block.

How do I change my fixed background?

To keep your background fixed, scroll, or local in CSS, we have to use the background-attachment property. Background-attachment: This property is used in CSS to set a background image as fixed or scroll. The default value of this property is scroll.

How do I add a fixed background image to my website?

Set a background image using the HTML body elementAdd the bgproperties="fixed" code into the body element, as shown below. Next, add the background="location" attribute to the body tag, where location is the relative or absolute URL of the image. In the above example, background="bg.


2 Answers

If you disable this on the .page-container class:

-ms-transform: translate3d(0, 0, 0);
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);

It should be better.

like image 82
Nick Van Loocke Avatar answered Oct 24 '22 11:10

Nick Van Loocke


There have been bugs in the past with transformations in Firefox. After some quick searching, it looks like on your .page-container class contains some transformations that when disabled appear to solve your problem.

.page-container {
    -ms-transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
}
like image 1
deversEatsALot Avatar answered Oct 24 '22 09:10

deversEatsALot