TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

The Square Grid - New CSS-Grid

88 点作者 abp超过 14 年前

9 条评论

JoelSutherland超过 14 年前
CSS grids are trivial to write. They consist of three major declaration types:<p>.row { width: ?px; clear: left; }<p>.col-1, .col-2.... { margin: ?px; float: left }<p>.col-1 { width: ?px; } .col-2 { width: ?px; }<p>Why do I bring this up? Because it is so simple to write these, it almost never makes sense to use a framework. If I ever want a grid for a particular project, I write it custom with a little help from excel.<p>This allows me to build mini-grid frameworks for whatever container width I need. This way I don't abandon separation of content from presentation across a whole site -- just on a particular page.
评论 #1804274 未加载
评论 #1803441 未加载
评论 #1803647 未加载
CWIZO超过 14 年前
I never understood what these CSS "frameworks" are supposed to do for me. Define the width of the two columns on my page? I just don't get it. This is a serious question, I'm not mocking/trolling, so I'd appreciate somebody enlightens me.<p>edit: thanks for the answers guys. I still don't get it though, it's just a couple of lines of CSS in this "frameworks". Oh well, I guess I just don't get it ...
评论 #1803295 未加载
评论 #1803297 未加载
评论 #1803306 未加载
评论 #1803582 未加载
评论 #1803551 未加载
rimantas超过 14 年前
<p><pre><code> When writing your code simply assign the "sg-" class to your box elements. </code></pre> That's why I don't like CSS frameworks: they throw the very idea of separation of content from presentation out of the window :(
评论 #1803438 未加载
jamesteow超过 14 年前
I like the fact that more people are trying to incorporate baselines into their grid. This is another one I found (<a href="http://baselinecss.com/" rel="nofollow">http://baselinecss.com/</a>) but I much prefer the one in the OP.
评论 #1803520 未加载
评论 #1803274 未加载
评论 #1803238 未加载
sp4rki超过 14 年前
I'm an advocate of frameworks, but only for fast prototyping. Nothing beats designing in the browser using Haml (<a href="http://haml-lang.com/" rel="nofollow">http://haml-lang.com/</a>) and Compass/Sass (<a href="http://compass-style.org/" rel="nofollow">http://compass-style.org/</a>) in conjunction with Static Matic (<a href="http://staticmatic.rubyforge.org/" rel="nofollow">http://staticmatic.rubyforge.org/</a>). Compass has blueprint integrated and using mixins you can avoid having an un-semantic mess in your Haml/Html.<p>Truth be told though, I use less and less the blueprint features in Compass each day. I find grids amazing for Photoshop (I generate a grid like the one in this thread for every comp) and Keynote/Wireframing/Initial Prototyping (I use a simple broad grid to do wireframes in Keynote), but really don't belong on my markup!
rgarcia超过 14 年前
I'm no web designer, but this looks very similar to 960.gs: <a href="http://960.gs/demo.html" rel="nofollow">http://960.gs/demo.html</a>
评论 #1803259 未加载
SebMortelmans超过 14 年前
I like the idea of designing with a grid in mind (I use the 960 grid for many of my projects), but I never use the CSS framework to convert it to html. I just don't see the point, every design is unique and handcoding is always more perfect/cleaner, yet doesn't take much longer, if at all, to write.
bean__超过 14 年前
I've been trying to look at this for a week now, it is always down. Maybe it's blocked outside the US?
pxlpshr超过 14 年前
one of the issues I have with CSS frameworks is that they typically remove semantics from the layout.