Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个可以缩放页面整个宽度的正文背景。
目前,它设置为 background-size: 100% 50px;
100% 非常适合大屏幕:背景按预期跨越页面的宽度。我也在寻找适用于小屏幕(和手机!)的东西。
我将背景从 body{} 移到了 html{}
将代码移至html
html
html { background: url(image.jpg) no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; }