问题描述
我有一个关于固定布局的问题。它有两个部分,紧密相关,所以我提出一个问题。
部分(a)
为什么960px建议网站布局?我知道它是针对最常见的屏幕分辨率(1024像素)进行了优化。但是为什么960px呢?
< div id =wrap>
< div id =left-column> ..< / div>
< div id =center-column> ..< / div>
< div id =right-column> ..< / div>
< / div>
1024px是它的目标最大屏幕宽度。我们需要允许一些窗口chrome,所以它需要更少。
960有很多因素:
回声因子(960);
1 2 3 4 5 6 8 10 12 15 16 20 24 30 32 40 48 60 64 80 96 120 160 192 240 320 480 960
1000没有那么多
1 2 4 5 8 10 20 25 40 50 100 125 200 250 500 1000
,您可以轻松地将960拆分为2,3,4,5,6和8列。
I have a question regarding fixed layout. It has two parts, closely related, so I'm putting in one question.
Part (a)Why 960px is suggested for the website layout? I understand that it is optimized for the most common screen resolution (1024px). But why exactly 960px? Won't the 1000px be as good?
Part (b)What exactly is Grid system? I did check 960.gs but didnt get the idea of columns. Is it better to use grid system (using the template from 960.gs, which looks so messy) or should i stick with traditional way, like:
<div id="wrap">
<div id = "left-column">..</div>
<div id = "center-column">..</div>
<div id = "right-column">..</div>
</div>
1024px is the max screen width it's aiming at. We need to allow some window chrome, so it needs to be less. We'd ideally like it to have lots of factors, allowing us to split it into equal size columns with integer widths.
960 has lots of factors:
echo factors(960);
1 2 3 4 5 6 8 10 12 15 16 20 24 30 32 40 48 60 64 80 96 120 160 192 240 320 480 960
1000 doesn't have as many
echo factors(1000);
1 2 4 5 8 10 20 25 40 50 100 125 200 250 500 1000
Specifically, you can easily split 960 into 2,3,4,5,6 and 8 columns.
这篇关于为什么宽度960px?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!