【发布时间】:2015-07-18 17:22:51
【问题描述】:
我正在尝试在引导网页上添加背景。当网页加载到笔记本电脑或台式机时,背景图像工作正常。但是,当页面在移动设备上加载时,屏幕的某些部分仍未填充,就会出现问题。
以下是我的代码:
<body style="background: url(img/backgroung.jpg) no-repeat center center fixed"
style="-webkit-background-size: cover"
style="moz-background-size: cover"
style="-o-background-size: cover"
style="background-size: cover"
style="background-size:100% auto"
>
【问题讨论】:
-
寻求调试帮助的问题(“为什么这段代码不起作用?”)必须在问题本身中包含所需的行为、特定问题或错误以及重现它所需的最短代码 。见How to create a Minimal, Complete, and Verifiable example
标签: css image twitter-bootstrap mobile background-image