Twitter bootstrap 启动模式打开时背景图像消失
我使用的是standart bootstrap“Jumbotron”模板。我向jumbotron添加了背景图像:Twitter bootstrap 启动模式打开时背景图像消失,twitter-bootstrap,modal-dialog,simplemodal,Twitter Bootstrap,Modal Dialog,Simplemodal,我使用的是standart bootstrap“Jumbotron”模板。我向jumbotron添加了背景图像: .jumbotron{ background: url("img/imgbg1.jpg") no-repeat center center; -webkit-background-size: 100%; -moz-background-size: 100%; -o-background-size: 100%; background-size:
.jumbotron{
background: url("img/imgbg1.jpg") no-repeat center center;
-webkit-background-size: 100%;
-moz-background-size: 100%;
-o-background-size: 100%;
background-size: 100%;
}
当我打开boostrap模式时,jumbotron背景图像消失,背景为灰色
为什么我会有这种行为?我找到了解决办法:
指向打开模式使用数据目标属性和远程位置页面的链接
<a data-toggle="modal" href="page.php" data-target="#modal" class="btn btn-primary">Open me</a>
在这个页面中,我加载了引导css
<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
这就是为什么我的巨无霸变成了灰色
我真傻:-)