蓝图 css 允许您将布局制定为网格而不是浮动,这是否正确?

发布于 2024-07-25 19:38:55 字数 180 浏览 1 评论 0原文

我听到的关于蓝图 CSS 的争论之一是,它让您根据网格而不是浮动来思考布局。 这对我来说似乎是一个很大的优势,因为我总是对我的浮标最终会在哪里感到困惑 - 有时一个浮标会意外地落到其他一些浮标下方,我很难弄清楚如何重新定位所有东西。 这是否使蓝图 css 对我来说是一个不错的选择 - 或者我应该花时间学习如何正确使用浮动并手动完成所有布局?

One of the arguments I've heard about blueprint css is that it lets you think of your layout in terms of a grid rather than in terms of floats. This seems like a big advantage to me because I always get confused about where my floats are going to end up - sometimes a float will unexpectedly drop down below some other floats and I have a hard time figuring out how to reposition everything. Does this make blueprint css a good choice for me - or should I just put the time in to learn how to use floats properly and do all of my layouts manually?

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

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

发布评论

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

评论(5

晒暮凉 2024-08-01 19:38:55

是的,绝对可以让您使用网格 - 请参阅此示例页面,这使得根据网格列对背景进行条纹化,网格可见。

(但我不得不说,花一点时间学习CSS布局的真正工作原理是值得的巨大的红利 - 更好地理解它,而不是放弃并尝试解决它,然后您将可以选择创建在各种不同设备上运行良好的灵活布局。)

Yes, absolutely it lets you use a grid - see this example page, which makes the grid visible by striping the background according to the grid columns.

(But I have to say, a little time spent learning how CSS layout really works would pay big dividends - better to understand it than to give up and try to work around it. And you'll then have the option of creating flexible layouts that work well on all sorts of different devices.)

我三岁 2024-08-01 19:38:55

绝对定位的最大问题之一是,未绝对定位的项目不知道绝对定位的项目存在。

当然,关于哪个更好的争论将永远持续下去,但使用可以根据浏览器大小和分辨率缩放的元素可能会更好。

One of the biggest issued with anything that is absolutely positioned is that items that are not absolutely positioned do not know that the absolutely positioned items exist.

Of course this is a debate that will go on forever about which is better but you will probably be better off using elements that can be scaled depending on the browser size and resolution.

秋风の叶未落 2024-08-01 19:38:55

在幕后,蓝图仍然使用浮动。

这是一种创建语义且可访问的“无浮动”布局的新颖方法,
http://www.tjkdesign.com/articles/css-layout/no_div_no_float_no_clear_no_hack_no_joke。 ASP

Under the hood, Blueprint still uses floats.

Here's a novel approach to creating "float-less" layouts that are semantic and accessble,
http://www.tjkdesign.com/articles/css-layout/no_div_no_float_no_clear_no_hack_no_joke.asp

无语# 2024-08-01 19:38:55

如前所述,BluePrint 是一个网格系统,但基于 CSS 浮动。 因此,理解 CSS 浮动对于真正掌握 BluePrint 的作用非常重要。

As stated, BluePrint is a grid system, but is based on CSS floats. So understanding CSS Floats is somewhat important to really grasp what BluePrint does.

云巢 2024-08-01 19:38:55

由于各种原因,我很少使用浮动而不是绝对定位。

I rarely use floats over absolute positioning for a variety of reasons.

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