简体   繁体   English

背景图片未在设备上调整大小

[英]Background image not resizing on devices

I have an issue with the background image not resizing on devices. 我的背景图片无法在设备上重新调整大小。 It looks fine when I rescale it in my laptop browser but not in the actual device. 当我在笔记本电脑的浏览器中而不是实际设备中重新缩放它时,它看起来不错。

I am using Bootstrap's .container-fluid. 我正在使用Bootstrap的.container-fluid。

This is the website: http://www.residenzacarducci.com/#/show 这是网站: http : //www.residenzacarducci.com/#/show

This is the css: 这是CSS:

body {
    background: url("/images/Verona_bridge_c1825.jpg") no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    font-family: Cinzel Decorative, cursive;
    color: #777;
}

Thank you! 谢谢!

DESIRED OUTCOME: 期望的结果:

期望的结果

ACTUAL OUTCOME: 实际结果:

实际结果

replace fixed with scroll, this should work 用滚动替换固定,这应该工作

body {
    background: url("/images/Verona_bridge_c1825.jpg") no-repeat center center scroll;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    font-family: Cinzel Decorative, cursive;
    color: #777;
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM