如何使用 CSS 网格框架来自定义宽度和间距?

发布于 2024-08-08 17:25:07 字数 231 浏览 3 评论 0原文

如何为自定义宽度制作自定义 CSS 网格框架?在我的公司,我在网站宽度上获得不同尺寸的设计(PSD),如 900px、920px、915px、973px 等,以及不同的装订线尺寸,如右侧 10 像素、左侧 20 像素等。在这种情况下如何我使用并受益于基于网格的框架

How to make custom CSS grid framework for custom widths? In my company i get design (PSD) in different sizes in width site like 900px, 920 px, 915px, 973 px etc. and different gutter sizes like 10 px on right, 20 px on left etc. in this type of condition how can i use and take benefir of grid based framework

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

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

发布评论

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

评论(5

梦途 2024-08-15 17:25:07

http://www.gridsystemgenerator.com/

这将根据表单中定义的值生成 CSS 。

http://www.gridsystemgenerator.com/

This will generate the CSS based on the values defined in the form.

情域 2024-08-15 17:25:07

每个人似乎都忽略了这一点:如果你的排水沟不规则,那么你就不能使用网格系统。您只需为每个列创建自定义类并根据需要使用它们。网格系统使用常规的排水沟,因此您可以按照您喜欢的任何顺序堆叠它们(列)。

——杰森

Everybody seems to have missed the point: if your gutters are not regular, then you can't use a grid system. You just create custom classes for each column and use them as needed. The grid systems use regular gutters so you can stack them (the columns) in a any order you like.

-- Jason

您还可以使用 http://www.960.gs。有许多在线选项可用于创建网格系统。非常简单!

You could also use http://www.960.gs. There are a number of online options to create a grid system. Its pretty simple!

感悟人生的甜 2024-08-15 17:25:07

如果您的宽度和装订线是任意大小,则您无法对所有这些使用一种网格系统。

要为每个设计创建不同的网格系统,宽度之间需要有一个公约数 - 这就是 dr.squid 提供的链接所做的 - 但对于 973 这样的宽度,你会很困难。

If your widths and gutters are arbitrary sizes, you can't use one grid system for them all.

To create a different grid system for each design, there needs to be a common divisor between the widths - which is what the link provided by dr.squid does - but with widths such as 973, you'll struggle.

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