Fixed Background Image
background:url('http://yoururl');
background-size: cover;
background-attachment: fixed;
How to make fixed full page background image on mobile as well as desktop? Wordpress - Divi - CSS
this css need to change:
body.custom-background {
...
background-attachment: fixed;
}
Fixed Background Image for Mobile with CSS
background-attachment: fixed;
does not work on mobile webkit. There is a workaround, you can place the image inline in the html, set the position fixed and z-index below the content.
this is related Using background-attachment:fixed in safari on the ipad
How to force a background image to have a fixed width in pixels
body { background-image: url("https://images.unsplash.com/photo-1477915737647-b5246ee6de6f?dpr=1&auto=format&fit=crop&w=1500&h=1000&q=80&cs=tinysrgb&crop="); background-size: 500px auto; background-repeat: no-repeat; background-attachment: fixed; background-position: center; }
<!DOCType html><html> <body> </body></html>
Related Topics
What Do Commas Mean in CSS Selectors
Bootstrap Dropdown Hiding in Modal
How to Select Nth Child of Specific Tag with CSS
Generating Vendor Prefixes in Less
Site Doesn't Look Right in Mobile Browser
Placing The: Before-Value in The Same Way as a List-Item Is Placed
CSS: Which Is Faster for The Browser? Color:#Fff; or Color:#Ffffff;
Difference Between CSS Fit-Content and Max-Content
Flexbox Column Align Self to Bottom
CSS Not Loading in Firefox, Opera and Ie - Chrome and Safari Works Just Fine
Adding Call Outs to a Highcharts - Stacked Bar
Can't Load CSS File in Javafx 8
Display Inline-Block Not Growing Horizontally with Child Having Padding in Per Cent
Highlight Div1 and Div2 on Div2 Mousover, Highlight Nothing on Div1 Mouseover