【问题标题】:How to remove Twitter Bootstrap (3.2) gradient in LESS如何在 LESS 中删除 Twitter Bootstrap (3.2) 渐变
【发布时间】:2014-12-14 18:49:20
【问题描述】:

我想知道是否有任何方法可以删除 .less 文件中的 Bootstraps 渐变,因为我正在使用 .less 文件来为我自己的应用程序设置主题。我尝试查看 variables.less 或 mixins.less,但它很快就会变得非常混乱。

我意识到当我在 Chrome 中时,我可以通过取消线性渐变来移除渐变,但我在任何地方都找不到。

有什么想法吗?

【问题讨论】:

    标签: css twitter-bootstrap-3 less linear-gradients


    【解决方案1】:

    我设法解决了我的问题。 我将“Mixins/gradients.less”文件更改为

    #gradient {
    
      .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {
        background-image: @start-color;
      }
      .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {
         background-image: @start-color;
      }
      .directional(@start-color: #555; @end-color: #333; @deg: 45deg) {
        background-image: @start-color;
      }
      .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {
        background-image: @start-color;
      }
      .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {
          background-image: @start-color;
      }
      .radial(@inner-color: #555; @outer-color: #333) {
        background-image: @inner-color;
      }
      .striped(@color: rgba(255,255,255,.15); @angle: 45deg) {
        background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);
        background-image: -o-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);
        background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);
      }
    }
    

    【讨论】:

    • 非常不错的选择。这在不破坏引导模式的情况下解决了我的问题。
    猜你喜欢
    • 1970-01-01
    • 2012-07-05
    • 2013-01-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-03-05
    相关资源
    最近更新 更多