如何使用固定网格蓝图在 CSS 设计中显示 100% 宽度的条纹?

发布于 2024-08-09 08:12:35 字数 330 浏览 2 评论 0原文

不确定标题是否真正描述了我想要做的事情。实际上,这在互联网上非常简单且广泛使用:

我希望在后台有一些液体/全宽的条纹(与设计的某些 div 具有相同的高度),而我的内容使用蓝图固定网格。

例如,这个网站: intient.com 正是我正在寻找的东西。黑色背景条纹(另一个灰色背景条纹)是液体宽度,内容使用网格(但在查看 CSS 后不是蓝图)

我使用蓝图固定宽度网格 (950px) 来显示任何内容。 你知道我该怎么做吗?与蓝图?并且没有静态背景图片...

谢谢

Not sure that the title is really describing what I am trying to do. Actually, this is quite simple and widespread usage over the internet :

I want in the background some liquid/full width of stripes (with the same height of some div of the design) while my content is using a Blueprint fixed-grid.

For instance, this website : intient.com is doing exactly what I am looking for. A background stripe in black (and another one in grey) that is liquid width and the content using a grid (but not Blueprint after having a look at the CSS)

I am using a Blueprint fixed-width grid (950px) for displaying any content.
Do you know how I can do that? With Blueprint? And without a static background image...

Thanks

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

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

发布评论

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

评论(1

冧九 2024-08-16 08:12:35

在蓝图中,您可以执行以下操作:

<div class="stripeContainer">
   <div class="container">
     <div class="span-8">Column 1</div>
     <div class="span-8">Column 2</div>
     <div class="span-8 last">Column 3</div>
   </div>
</div>
<div class="container">
  <div class="span-12">Body goes here</div>
  <div class="span-12 last">Some sort of menu perhaps</div>
</div>

然后设置 .stripeContainer 的样式:

.stripeContainer
{
    width: 100%; /* this is usually implied */
    background-color: pink;
}

In Blueprint, you do this:

<div class="stripeContainer">
   <div class="container">
     <div class="span-8">Column 1</div>
     <div class="span-8">Column 2</div>
     <div class="span-8 last">Column 3</div>
   </div>
</div>
<div class="container">
  <div class="span-12">Body goes here</div>
  <div class="span-12 last">Some sort of menu perhaps</div>
</div>

Then you style .stripeContainer:

.stripeContainer
{
    width: 100%; /* this is usually implied */
    background-color: pink;
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文