YUI中的css——Grids.css
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/)
Here are some other things to keep in mind: 1) The width is set in ems because ems 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.
| 模板類 | 預設描述 |
| .yui-t1 | 左邊160px的邊欄 |
| .yui-t2 | 左邊180px的邊欄 |
| .yui-t3 | 左邊300px的邊欄 |
| .yui-t4 | 右邊180px的邊欄 |
| .yui-t5 | 右邊240px的邊欄 |
| .yui-t6 | 右邊300px的邊欄 |
| 特殊的內部類 | 預設描述 |
| .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 |
浙公網安備 33010602011771號