【问题标题】:Show compass blueprint grid显示指南针蓝图网格
【发布时间】:2011-07-26 05:38:47
【问题描述】:

是否可以显示指南针蓝图网格以查看其布局。

这是我想要实现的示例:

http://www.blueprintcss.org/tests/parts/grid.html

【问题讨论】:

    标签: sass compass-sass


    【解决方案1】:

    或者,包括 showgrid mixin(原始 SASS 语法中的+showgrid):

    #my-container
      +showgrid
    

    但是,您确实需要为您的特定网格风格生成图像:

    $ compass grid-img W+GxH [path/to/grid.png]
    # Where:
    # 
    # W = Width of 1 column in pixels.
    # G = Width of 1 gutter in pixels.
    # H = Height of the typographic baseline in pixels.
    

    【讨论】:

    • 使用最新的指南针版本,不需要创建网格图像,因为指南针现在使用 css3 显示它。
    【解决方案2】:

    只需将类 showgrid 添加到您的容器中

    如果您检查该页面上的元素并删除 showgrid 类,您会看到它消失

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-06-13
      • 2012-12-18
      • 2011-10-06
      • 2011-01-05
      • 1970-01-01
      • 2011-08-27
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多