【问题标题】:How to bring bootstrap 3 panels into bootstrap 2 website?如何将 bootstrap 3 面板带入 bootstrap 2 网站?
【发布时间】:2013-09-09 17:00:23
【问题描述】:

我搜索了很多,但找不到任何东西!我该怎么做?是否有任何图书馆或类似的东西或任何修复

【问题讨论】:

  • 打开bootstrap的css,把所有相关的css复制到2?
  • 仅使用面板自定义/编译引导程序 3。之后检查它是否与手册中的 bootstrap 2 css/js 冲突,并在没有冲突组件的情况下自定义/编译 bootstrap 2。将 css 从 bootstrap 3 复制到 bootstrap 2 文件。

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


【解决方案1】:

Bootstrap 3 中的面板仅使用 CSS 构建。你会在less/panels.less中找到代码

为方便起见:打开 panel.less 并在此文件顶部添加以下行:

@import "variables.less";
@import "mixins.less";

用任何更少的编译器编译这个文件到 css。将结果复制到 Bootstrap 的 CSS 下方的 BS2 文档中。

见:http://bootply.com/79222

面板标题 (h3) 从 BS2 Css 获得了 40px 的行高,添加一行额外的 css 以撤消此操作:.panel-heading > h3 {line-height:20px;}

您也可以将 panel.less 复制到 Twitter 的 Bootstrap 2 less 中,然后将其导入 bootstrap.less 并编译它。在这种情况下,至少将面板变量从 variables.less 复制到 Bootstrap 2 的 variables.less 中。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2023-03-15
    • 1970-01-01
    • 1970-01-01
    • 2019-04-25
    • 1970-01-01
    • 1970-01-01
    • 2016-07-30
    相关资源
    最近更新 更多