蓝图 CSS 框

发布于 2024-09-29 02:46:05 字数 435 浏览 1 评论 0原文

我目前正在测试 Blueprint 来创建网站的布局。到目前为止,一切进展顺利,但现在我遇到了一个问题,我想知道是否有任何优雅的解决方案。

我正在使用默认的 24 列布局,并且有一种情况我想做类似的事情:

<div class="span-8 box">..</div>
<div class="span-8 box">..</div>
<div class="span-8 box last">..</div>

问题是盒子类添加了一个填充,导致三个 div 不适合 24 列。 一种“解决方案”是对所有三个都使用 span-7,但这不会填充整个宽度。

有什么想法吗?

I am currently testing out Blueprint to create the layout for a site. So far it has been going great, but now I've run into a problem I'm wondering if there is any elegant solution to.

I am using the default 24 column layout and have a situation where I would like to do something similar to:

<div class="span-8 box">..</div>
<div class="span-8 box">..</div>
<div class="span-8 box last">..</div>

Problem is that the box-class adds a padding which causes the three div's to not fit into the 24 columns.
One "solution" is to use span-7 instead for all three, but this doesn't fill the entire width.

Any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

Spring初心 2024-10-06 02:46:05

您可以这样使用该类:

<div class="span-8">
    <div class="box">..</div>
</div>
<div class="span-8">
    <div class="box">..</div>
</div>
<div class="span-8 last">
    <div class="box">..</div>
</div>

You can use the class this way:

<div class="span-8">
    <div class="box">..</div>
</div>
<div class="span-8">
    <div class="box">..</div>
</div>
<div class="span-8 last">
    <div class="box">..</div>
</div>
如此安好 2024-10-06 02:46:05

您可以更改“span-7”css 规则:

...
.span-7 {width:274px;}
...

并将 div 更改为“span 7”。

我能想到的最简单的事情:)

jsFiddle 示例

You could change the "span-7" css rule:

...
.span-7 {width:274px;}
...

And change the divs to "span 7".

Simplest thing I could think of :)

jsFiddle example.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文