【问题标题】:How to use/compile LESS for Bootstrap?如何为 Bootstrap 使用/编译 LESS?
【发布时间】:2014-06-10 08:57:46
【问题描述】:

我想利用 Twitter Bootstrap,但也想用 php 而不是 js 编译 LESS 任何人都可以发布一个如何使用 php 执行此操作的示例,因为我无法在网上找到任何参考。我是 LESS 和 Bootstrap 的新手,所以请添加一些细节。谢谢!

【问题讨论】:

  • 更少的 PHP? leafo.net/lessphp
  • 我在上面,正在阅读文档但实际编译过程不清楚,对于引导程序,如何包含它,包含php类和比?

标签: php twitter-bootstrap less


【解决方案1】:

您可以尝试使用lessphp

编译 Bootstrap LESS 文件的简单设置是:

<?php
  require "lessc.inc.php";

  $less = new lessc;
  $less->checkedCompile("bootstrap.less", "bootstrap.css");
  $less->checkedCompile("bootstrap-responsive.less", "bootstrap-responsive.css");

【讨论】:

    【解决方案2】:

    您也可以在本地机器上编译 LESS。有很多 GUI 应用程序可以帮助您。

    另请参阅此问题:Compile a referenced LESS file into CSS with PHP automatically

    【讨论】:

      【解决方案3】:

      http://lessphp.gpeasy.com/Bootstrap 用于 bootstrap 3.1.1 的更少 php 编译器

      【讨论】:

        猜你喜欢
        • 2016-01-28
        • 1970-01-01
        • 1970-01-01
        • 2014-04-30
        • 1970-01-01
        • 2015-01-21
        • 2013-10-03
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多