我们应该使用CSS框架吗?他们值得吗?

时间:2022-09-11 12:10:52

CSS frameworks have nice styles inbuilt and ask you to focuses on the grids but still there is a bit of dependency and lack of freedom it provide.. If I need to generate a webpage by looking on a PSD based mockup screen ..either i will use the classes provided by the framework but if that actual measurements does not exist I need to again specify my own rules that will add upto my CSS filesize and if performance is a constraint as always it is...you need not a big size file..though its in kb but every drop counts.

CSS框架内置了很好的样式,并要求你专注于网格,但仍然有一点依赖和它提供的*缺乏..如果我需要通过查看基于PSD的模型屏幕生成一个网页..我要么使用框架提供的类,但如果实际测量不存在,我需要再次指定我自己的规则,这些规则将添加到我的CSS文件大小,如果性能是一个约束,它总是......你不需要一个大的文件虽然它在kb但是每一滴都很重要。

Any comments and suggestions to use the framework in a best possible way.

以最佳方式使用框架的任何意见和建议。

5 个解决方案

#1


Css frameworks are not like the regular code frameworks/libraries that provide functions that allow you to do your work faster.. it is more like having a starter file, that saves you the time of writing css that you use in all your projects.

Css框架不像常规代码框架/库那样提供允许您更快地完成工作的函数。它更像是有一个启动文件,这可以节省您编写在所有项目中使用的CSS的时间。

Saying that, I really do believe the best way to use a css framework is to look at what css you use more often and create a homegrown css framework. Personally i use the same reset and typography rules for the majority of my projects. I do have a collection of different grids, but really that differs based on the type of project. Not all designs will work with a grid.

说,我真的相信使用css框架的最佳方法是查看你经常使用的css并创建一个自行开发的css框架。我个人对大多数项目使用相同的重置和排版规则。我确实有一系列不同的网格,但实际上根据项目的类型而有所不同。并非所有设计都适用于网格。

Before when I tried to use a pre-built framework, I found myself wasting time removing styles or working around some of the styles from the framework. That is just from my experience with frameworks, I do know people that love working with Blueprint and swear by it.

在我尝试使用预先构建的框架之前,我发现自己浪费时间去除样式或从框架中解决一些样式。这仅仅是我对框架的体验,我确实知道喜欢使用Blueprint并且发誓的人。

#2


I think a style reset is great - but a framework is too limiting. You are forced to use their classes etc.

我认为样式重置很棒 - 但框架太有限了。你*使用他们的课程等。

This could result in some inconsistent class names, like for example if you have a site that separates words with a hyphen (-) and then you use a grid that uses the underscore (_).

这可能会导致一些不一致的类名,例如,如果您有一个用连字符( - )分隔单词的站点,然后使用使用下划线(_)的网格。

You also have to buy in to that framework, as in adopt it for your whole site (if the main template is using it).

您还必须购买该框架,就像在整个网站中采用它一样(如果主模板正在使用它)。

See UnobtrusiveCss for a laugh :).

请看UnobtrusiveCss笑一笑:)。

#3


I think it is a question of using the right tool for the job.

我认为这是一个使用正确工具的问题。

I use BluePrint CSS a lot and it really helps me to create standard web sites very quickly. Most of the time that is just what my clients want. If I need to dig deeper - I'll roll my own CSS, for that job - but it makes the site more expensive and takes a wee bit longer to develop and test.

我经常使用BluePrint CSS,这真的很有助于我快速创建标准网站。大部分时间都是我的客户想要的。如果我需要深入挖掘 - 我将推出自己的CSS,用于那项工作 - 但它会使网站更加昂贵,并且需要更长的时间来开发和测试。

I don't think CSS frameworks are an alternative to learning CSS, they just help you do standard things quickly and easily.

我不认为CSS框架是学习CSS的替代方案,它们只是帮助您快速轻松地完成标准事务。

Hope that helps?

希望有帮助吗?

#4


CSS Frameworks are my favourite tools for designing a page, take a look on 960er.gs a nice grid framework.

CSS Frameworks是我最喜欢的设计页面工具,看看960er.gs是一个不错的网格框架。

Ok you're limited somethines about the sizes, but you are able to design your pages much faster, after a week you know all classes.

好吧,你对这些尺寸有所限制,但是你能够更快地设计你的页面,一周后你就会知道所有的课程。

#5


So the moral of the story is use css reset and for visual aid for debugging a grid image in body will do the necessary. Pic lens addon will surely help for matching pixel. Thanks all for your encouraging response

因此,故事的寓意是使用css重置和视觉辅助调试体内的网格图像将做必要的。 Pic镜头插件肯定有助于匹配像素。谢谢大家的鼓励

#1


Css frameworks are not like the regular code frameworks/libraries that provide functions that allow you to do your work faster.. it is more like having a starter file, that saves you the time of writing css that you use in all your projects.

Css框架不像常规代码框架/库那样提供允许您更快地完成工作的函数。它更像是有一个启动文件,这可以节省您编写在所有项目中使用的CSS的时间。

Saying that, I really do believe the best way to use a css framework is to look at what css you use more often and create a homegrown css framework. Personally i use the same reset and typography rules for the majority of my projects. I do have a collection of different grids, but really that differs based on the type of project. Not all designs will work with a grid.

说,我真的相信使用css框架的最佳方法是查看你经常使用的css并创建一个自行开发的css框架。我个人对大多数项目使用相同的重置和排版规则。我确实有一系列不同的网格,但实际上根据项目的类型而有所不同。并非所有设计都适用于网格。

Before when I tried to use a pre-built framework, I found myself wasting time removing styles or working around some of the styles from the framework. That is just from my experience with frameworks, I do know people that love working with Blueprint and swear by it.

在我尝试使用预先构建的框架之前,我发现自己浪费时间去除样式或从框架中解决一些样式。这仅仅是我对框架的体验,我确实知道喜欢使用Blueprint并且发誓的人。

#2


I think a style reset is great - but a framework is too limiting. You are forced to use their classes etc.

我认为样式重置很棒 - 但框架太有限了。你*使用他们的课程等。

This could result in some inconsistent class names, like for example if you have a site that separates words with a hyphen (-) and then you use a grid that uses the underscore (_).

这可能会导致一些不一致的类名,例如,如果您有一个用连字符( - )分隔单词的站点,然后使用使用下划线(_)的网格。

You also have to buy in to that framework, as in adopt it for your whole site (if the main template is using it).

您还必须购买该框架,就像在整个网站中采用它一样(如果主模板正在使用它)。

See UnobtrusiveCss for a laugh :).

请看UnobtrusiveCss笑一笑:)。

#3


I think it is a question of using the right tool for the job.

我认为这是一个使用正确工具的问题。

I use BluePrint CSS a lot and it really helps me to create standard web sites very quickly. Most of the time that is just what my clients want. If I need to dig deeper - I'll roll my own CSS, for that job - but it makes the site more expensive and takes a wee bit longer to develop and test.

我经常使用BluePrint CSS,这真的很有助于我快速创建标准网站。大部分时间都是我的客户想要的。如果我需要深入挖掘 - 我将推出自己的CSS,用于那项工作 - 但它会使网站更加昂贵,并且需要更长的时间来开发和测试。

I don't think CSS frameworks are an alternative to learning CSS, they just help you do standard things quickly and easily.

我不认为CSS框架是学习CSS的替代方案,它们只是帮助您快速轻松地完成标准事务。

Hope that helps?

希望有帮助吗?

#4


CSS Frameworks are my favourite tools for designing a page, take a look on 960er.gs a nice grid framework.

CSS Frameworks是我最喜欢的设计页面工具,看看960er.gs是一个不错的网格框架。

Ok you're limited somethines about the sizes, but you are able to design your pages much faster, after a week you know all classes.

好吧,你对这些尺寸有所限制,但是你能够更快地设计你的页面,一周后你就会知道所有的课程。

#5


So the moral of the story is use css reset and for visual aid for debugging a grid image in body will do the necessary. Pic lens addon will surely help for matching pixel. Thanks all for your encouraging response

因此,故事的寓意是使用css重置和视觉辅助调试体内的网格图像将做必要的。 Pic镜头插件肯定有助于匹配像素。谢谢大家的鼓励