1,grids.css中頁面配置的寬度用的是em寬度,是因為em會隨著使用者調整字型的大小(查看-文字大小)而改變寬度,從而有更好的使用者體驗;
2,根據reset.css,頁面字型大小為13px,所以頁面寬度也要根據13px來設定em,但是,在ie中有點問題,如果在firefox等標準瀏覽器中字1em為13px的話,在ie中要13.3333px,而且用*過濾器來設定ie中的em寬度。如在body字型大小為13px的情況下設定頁面寬度為600px,在ie中為45.00em,而在firefox等標準瀏覽器中為46.15em。
3,注意(來自http://developer.yahoo.com/yui/grids/)
Note:
Here are some other things to keep in mind: 1) The width is set in em
s because em
s scale with user-initiated font-size adjustment, and therefore provide a superior user experience. 2) YUI Fonts does a good job of normalizing the width of an em
, but we're still obliged to provide a slightly different value for IE. 3) Be sure the width
value for IE comes after the value for everybody else. 4) Setting the min-width
is optional, but helps the grid maintain integrity as the viewport shrinks. 5) The text-align
and margin
are used to help center the page, and should not be modified.
4,
模板類 |
預設描述 |
.yui-t1 |
左邊160px的側邊欄 |
.yui-t2 |
左邊180px的側邊欄 |
.yui-t3 |
左邊300px的側邊欄 |
.yui-t4 |
右邊180px的側邊欄 |
.yui-t5 |
右邊240px的側邊欄 |
.yui-t6 |
右邊300px的側邊欄 |
5,
特殊的內部類 |
預設描述 |
.yui-gb |
1/3 - 1/3 - 1/3 |
.yui-gc |
2/3 - 1/3 |
.yui-gd |
1/3 - 2/3 |
.yui-ge |
3/4 - 1/4 |
.yui-gf |
1/4 - 3/4 |