繁体   English   中英

CSS框架(即960gs或Blueprintcss)可以无边距使用吗?

[英]Can CSS frameworks (ie: 960gs or Blueprintcss) be used without margins?

我认为使用http://960.gshttp://blueprintcss.org并不能实现漂亮的杂志版面/ marketing-esq小册子以外的页边距。 我是否可以使用这些方法来满足某些设计要求,例如导航栏实际上可以触摸/环绕标头? 使用这些框架而没有任何余地的任何输入(因为它们将浏览器兼容性强加给了CSS专家级别较低的开发人员)将是理想的。 (注意:我们使用的是JSF,这也是开发商店,根本不是网上商店)

我将此技术用作我的最终CSS布局技术:

http://www.codeofficer.com/blog/entry/css_grid_frameworks_960gs_without_margins/

我曾经遇到过同样的问题,并且由于使用了那个问题,所有的利润困扰都消失了。 当我需要使用自定义宽度/高度时,我会使用!important覆盖。

编码:

<div class="g_9 content_main">
    This div should actually have 720px in width.
    But I overide it using another class so now the width has become 700px,
    and just in case it needs custom margin, we can always set it in the css :)
</div>

CSS:

.c_12 .g_9, .c_16 .g_12 { width: 720px; } /* 960-full.css */
.content_main { width: 700px !important; margin-left: 15px;} /* style.css */

这是我编写的与960g兼容的mod,可帮助您创建具有触摸感的元素,而无需重写框架。

http://www.michaelhartmayer.com/css/960gs-margin-mod

您不必为站点上的每个div使用网格类。 如果您不需要标题,则不需要遵循网格布局,然后为标题创建自己的样式。 您也可以完全跳过网格,而仅使用表单和排版标记。 这些框架是为了使您的项目具有一定的一致性。

我将蓝图用作主要内容,但标题区域具有其自己的自定义布局。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM