【问题标题】:bootstrap background image not responsive to mobile devices引导背景图像不响应移动设备
【发布时间】: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"
   >    

【问题讨论】:

标签: css image twitter-bootstrap mobile background-image


【解决方案1】:

可能你想要这样的东西:

body {
background: url('img/backgroung.jpg');
background-repeat: no-repeat;
background-position: center center;
background-attachment: fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-03-26
    • 1970-01-01
    • 2018-11-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-11-13
    相关资源
    最近更新 更多