• Welcome to XF2 Addons. You can buy my Premium membership for $35 per year, and this gives you access to download any or ALL of the 250+ add-ons that I have developed for Xenforo 2.x. In addition, Premium members will get technical support. Once the Premium membership has expired you can continue to use the installed addons on your forum as long as you like.

How can a background image be steady ( not scrolling up/down )


chrisnarts

New Member
can you help me out please
How can a background image be steady ( not scrolling up/down )


i insert image here

Appearance
StylesDefault Style Dark - Style properties
Page setup

4DCKtSn.png
 

Dynamic

New Member
Try this. Add the following to extra.less

body:before {
content: "";
display: block;
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: -10;
background: url('styles/default/xenforo/background/darkstyle.jpg') no-repeat top center;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}




The reason for doing it this way is because on mobile devices, using 'fixed' for background images will not work as it is intensive for the mobile device. This is a css workaround.

Cheers.
 
Top