問題描述
我正在開發(fā)一個(gè)公司網(wǎng)站,我認(rèn)為我應(yīng)該開始使用 CSS 框架.周圍有很多 CSS 框架,最常用的一個(gè)是什么,為什么人們會(huì)選擇使用它而不是其他框架?
I'm working on a company website and I figure that I should start using a CSS framework. There's quite a number of CSS frameworks around, what's the most commonly used one and why would people choose to use it instead of the other frameworks?
推薦答案
首先,不要自動(dòng)假設(shè) CSS 框架是必要的,甚至是可取的.取決于你在做什么以及你在標(biāo)記 + CSS 方面有多好,這可能不值得.維基百科文章幾乎沒有觸及我在網(wǎng)上看到的辯論的表面,例如,這個(gè) 對(duì) YUI Grids 框架的批評(píng).
First, don't just automatically assume a CSS framework is necessary, or even desirable. Depending on what you're doing and how good you are at markup + CSS, it may not be worth it. The Wikipedia article barely scratches the surface of the debate I've seen online, e.g., this criticism of the YUI Grids framework.
如果您已經(jīng)決定 CSS 框架適合您,那么您需要決定它將為您解決哪些問題.獲得該列表后,您可以開始比較不同的列表,看看它們?nèi)绾谓鉀Q您的問題.
If you've decided that a CSS framework is for you, then you need to decide what problems it will be solving for you. Once you have that list, you can start comparing different ones to see how well they address your problems.
最后,有許多次要因素可能會(huì)改變您的特定應(yīng)用程序的平衡.已經(jīng)在網(wǎng)站上使用 YUI?然后重置,基礎(chǔ)、字體和Grids 組合可能會(huì)遇到問題,等等.
Finally, there are any number of minor factors that may shift the balance for your particular application. Already using YUI on the site? Then the Reset, Base, Fonts, and Grids combo may get a bump, etc.
我最常看到的兩個(gè)參考是 YUI 和 BluePrintCSS(這里是 比較).
The two I've seen reference most often are YUI's and BluePrintCSS (here's a comparison).
更新:我沒有看到 CSS 框架明確解決的一件事是 將 Web 上的類型設(shè)置為基線網(wǎng)格(參見這篇關(guān)于垂直節(jié)奏作曲的文章a> 了解更多詳情).
UPDATE: One thing I haven't seen explicitly addressed by a CSS framework is Setting Type on the Web to a Baseline Grid (see this article on composing to a vertical rhythm for more details).
這篇關(guān)于如何選擇 CSS 框架?的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!