Html 如何在面板标题中添加响应性背景图像。Twitter引导程序3
伙计们! 我真的需要添加一些图像作为背景到我的面板标题。我还想要h3在里面。 这是我的密码:Html 如何在面板标题中添加响应性背景图像。Twitter引导程序3,html,css,twitter-bootstrap,twitter-bootstrap-3,Html,Css,Twitter Bootstrap,Twitter Bootstrap 3,伙计们! 我真的需要添加一些图像作为背景到我的面板标题。我还想要h3在里面。 这是我的密码: <div class="row col-wrap"> <div class="col-lg-4 col"> <div class="panel panel-default"> <div class="panel-heading">
<div class="row col-wrap">
<div class="col-lg-4 col">
<div class="panel panel-default">
<div class="panel-heading">
<h3>Simple</h3>
</div>
<div class="panel-body">
<ul class="list-group">
<li class="list-group-item alert alert-success">Smth
<span class="glyphicon glyphicon-ok pull-right"></span></li>
<li class="list-group-item alert alert-danger">smth1
<span class="glyphicon glyphicon-remove pull-right"></span></li>
<li class="list-group-item alert alert-danger">Smth2<span class="glyphicon glyphicon-remove pull-right"></span></li>
<li class="list-group-item alert alert-danger">Smth3<span class="glyphicon glyphicon-remove pull-right"></span></li>
<li class="list-group-item alert alert-danger">Smth4<span class="glyphicon glyphicon-remove pull-right"></span></li>
</ul>
</div>
<div class="panel-footer clearfix">
<h5 class="col-lg-6 col-xs-6">19 999р.</h5>
<button class="btn btn-success pull-right col-lg-6 col-xs-6" type="submit" data-toggle="modal" data-target="#standartCta">Choose</button>
</div>
</div>
</div>
}
什么也没发生。Bg仍然填充默认引导颜色 将
背景图像
更改为背景
,然后添加!重要信息
至行尾(分号前)
jsIDLE:尝试从背景图像中删除禁止重复:) no repeat属于它自己的属性“background repeat”,除非您切换到纯背景语句,然后遵循另一个答案:) 作为参考,您可能希望在一些关于简写css声明的文档中达到顶峰:)
。面板标题{
背景图片:url(https://c2.staticflickr.com/6/5551/15140731082_a2c3a4a2c4_n.jpg);
背景位置:中心;
背景尺寸:封面;
-webkit背景尺寸:封面;
-moz背景尺寸:封面;
-o-背景尺寸:封面;
}
简单的
- Smth
smth1
Smth2
Smth3
Smth4
19 999р.
选择
啊,是的,这也可以。你可能必须包括!如果它仍然不起作用,则很重要。
.panel-heading{
background-image: url(../img/flowerbg.svg) no-repeat;
background-position: center;
background-size: cover;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background: url(../img/flowerbg.svg) no-repeat !important;