• Welcome to XF2 Addons. All the XF2 addons located in the Resources area are available for download once you upgrade your account to Premium membership. In addition, Premium members will get technical support. Premium membership costs only $35.00 USD a year. Once the year 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