Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/xpath/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Twitter bootstrap 引导更改.container的15 px填充颜色_Twitter Bootstrap_Twitter Bootstrap 3 - Fatal编程技术网

Twitter bootstrap 引导更改.container的15 px填充颜色

Twitter bootstrap 引导更改.container的15 px填充颜色,twitter-bootstrap,twitter-bootstrap-3,Twitter Bootstrap,Twitter Bootstrap 3,我正在尝试在.container类的左右两侧以15px填充的方式放置一个图像这是您的期望吗?希望有用 .你的形象{ 左侧填充:15px; 右侧填充:15px; } 在容器上提供额外的类,然后覆盖引导css 例如: html <div class="container container-custom"> ... </div> 将背景色添加到容器中,并将行div放入其中。你会得到的外观,好像填充物是灰色的 .container{ 背景颜色:灰色; 高度:100p

我正在尝试在.container类的左右两侧以15px填充的方式放置一个图像

这是您的期望吗?希望有用


.你的形象{
左侧填充:15px;
右侧填充:15px;
}

在容器上提供额外的类,然后覆盖引导css

例如: html

<div class="container container-custom">
  ...
</div>

背景色
添加到容器中,并将
div放入其中。你会得到的外观,好像填充物是灰色的

.container{
背景颜色:灰色;
高度:100px;
}
.内排{
高度:100px;
背景色:红色;
保证金:0px 10px 0px 10px;
}


.container.container-custom{padding:0 5px!重要;/*覆盖css*/}您好,谢谢您的回答这里有一个链接,指向我想用灰色填充容器填充的页面。www.hitchesnmore.com/index123.php Thanks无法在填充物上提供颜色,,尝试在容器上设置边框。是否可以有一个背景图像并将容器放置在其上,以便我显示15px的填充是图像,或者填充是否也会覆盖背景图像其他
。container
类的左右两侧已经有15px的填充。分享您尝试过的代码,并澄清问题。感谢您的帮助,我创建了嵌套容器,效果非常好
.container.container-custom
{
padding:0 5px;
}