【问题标题】:Bootstrap3 300x250 banner in col-md-3 or col-md-4在 col-md-3 或 col-md-4 中的 Bootstrap3 300x250 横幅
【发布时间】:2013-12-15 08:07:14
【问题描述】:

我们使用bootstrap3 和基本的两列布局。左列的类是col-md-9,右列也是col-md-3

但是,当我们想在右栏放置横幅时,我们遇到了问题。

对于一个普通的广告横幅(300x250px)col-md-3 是小 (width is 261px)col-md-4 是大 (359px)

我们如何通过保留引导程序的所有响应功能来将col-md-3 修复为300px

有什么通用的方法可以做到这一点吗?

【问题讨论】:

  • 请添加您的设计草图。是否允许调整横幅大小?乍一看,请添加一个类 img-responsive 到您的横幅。或者你的 col-md-4 中的一个 pull-right 类。

标签: css twitter-bootstrap twitter-bootstrap-3


【解决方案1】:

在您的情况下,将默认的 12 列网格更改为 16 列(或其他)可能更好

尝试更改以下变量:

// Number of columns in the grid system
@grid-columns:              12;
// Padding, to be divided by two and applied to the left and right of all columns
@grid-gutter-width:         30px;

例如:
右 - 5 列
左 - 9 列

【讨论】:

    猜你喜欢
    • 2018-12-01
    • 1970-01-01
    • 2013-10-02
    • 1970-01-01
    • 2013-12-13
    • 2014-03-05
    • 2017-02-21
    • 2015-07-07
    • 2018-06-28
    相关资源
    最近更新 更多