【问题标题】:What is the main reason to use new grid system?使用新网格系统的主要原因是什么?
【发布时间】:2013-12-06 09:18:11
【问题描述】:

我想将我的项目从 TBS 2.3 迁移到 3,我有一个问题:
为什么我应该使用 col-*- 这样的新类而不是 span*?
因为我可以使用这两个文件,所以我页面上的新 bootstrap.css 和旧 bootstrap-responsive.css 以及旧 span* 都可以很好地工作...
有什么建议么?

【问题讨论】:

    标签: twitter-bootstrap twitter-bootstrap-3


    【解决方案1】:

    开始阅读:Writing Twitter's Bootstrap with upgrading to v3 in mind。新的 TB3 以移动优先的方式编写,为not backward-compatible

    使用 old bootstrap-responsive.css 将覆盖来自 TB3 的 CSS 规则。这样做我希望你现在或将来会遇到冲突。除了移动优先方式 TB3 也切换到看box-sizing: border-box?:Why did Bootstrap 3 switch to box-sizing: border-box?

    要为您的问题找到解决方案,请阅读:Updating Bootstrap to version 3 - what do I have to do?

    this blog 中建议选择使用 LESS 将 col-lg-* 或 col-sm-* 属性复制到 span-* 我从未尝试过。 使用最新的源代码,应该可以构建具有与 col-- 相同属性的 span* 类。您必须将这些类添加到 grid.less 并使用来自 mixins.less 的修改过的 mixins。

    【讨论】:

      猜你喜欢
      • 2017-07-03
      • 2014-12-24
      • 1970-01-01
      • 1970-01-01
      • 2012-05-29
      • 1970-01-01
      • 1970-01-01
      • 2012-11-10
      • 1970-01-01
      相关资源
      最近更新 更多