我们应该使用 CSS 框架吗? 他们值得吗?
CSS 框架内置了很好的样式,并要求您专注于网格,但它仍然存在一点依赖性并且缺乏自由。如果我需要通过查看基于 PSD 的模型屏幕来生成网页..我会使用框架提供的类,但如果实际测量不存在,我需要再次指定我自己的规则,这些规则将增加我的CSS文件大小,并且如果性能一如既往地成为一个约束......你不需要一个大尺寸的文件..虽然它以 kb 为单位,但每一滴都很重要。
任何关于以最佳方式使用该框架的意见和建议。
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.
Any comments and suggestions to use the framework in a best possible way.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
我认为风格重置很棒 - 但框架太有限了。 您被迫使用它们的类等。
这可能会导致一些不一致的类名称,例如,如果您有一个使用连字符 (-) 分隔单词的网站,然后您使用的网格使用下划线 (_)。
您还必须购买该框架,就像在整个网站中采用它一样(如果主模板正在使用它)。
请参阅 UnobtrusiveCss 来笑一下:)。
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 :).
CSS 框架不像常规的代码框架/库,它们提供的功能可以让您更快地完成工作。它更像是一个启动文件,可以节省您编写在所有项目中使用的 css 的时间。
话虽如此,我确实相信使用 css 框架的最佳方法是查看您更经常使用的 css 并创建一个自行开发的 css 框架。 就我个人而言,我对大多数项目使用相同的重置和排版规则。 我确实有不同网格的集合,但实际上根据项目类型的不同而有所不同。 并非所有设计都适用于网格。
之前,当我尝试使用预构建的框架时,我发现自己浪费时间删除样式或解决框架中的某些样式。 这只是根据我使用框架的经验得出的,我确实认识喜欢使用 Blueprint 并对其深信不疑的人。
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.
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.
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 CSS,它确实帮助我非常快速地创建标准网站。
大多数时候,这正是我的客户想要的。 如果我需要更深入地挖掘 - 我会为这项工作推出自己的 CSS - 但这会使网站更加昂贵,并且需要更长的时间来开发和测试。
我不认为 CSS 框架是学习 CSS 的替代品,它们只是帮助你快速、轻松地完成标准的事情。
希望有帮助吗?
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.
I don't think CSS frameworks are an alternative to learning CSS, they just help you do standard things quickly and easily.
Hope that helps?
CSS 框架是我最喜欢的页面设计工具,看看 960er.gs 一个不错的网格框架。
好吧,你对尺寸有一些限制,但是你可以更快地设计你的页面,一周后你就知道了所有的课程。
CSS Frameworks are my favourite tools for designing a page, take a look on 960er.gs a nice grid framework.
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.
所以这个故事的寓意是使用CSS重置和视觉辅助来调试正文中的网格图像将做必要的事情。
图片镜头插件肯定有助于匹配像素。
感谢大家的鼓励回应
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