有没有用于 Web 开发的通用 CSS 库?
我正在从事一个网络开发项目,我需要负责应用程序的设计和工作。我发现很难设计我的 UI 样式,它应该与所有主流浏览器兼容。
例如,要对齐我给出的 div 内的文本
text-align:center
,该方法仅在 IE 中有效,而在 Firefox、Safari、Chrome 和 Opera 中无效。所以我给出了 Mozilla CSS 样式
text-align:-moz-center
,它似乎只能在 Firefox 中修复位置,而不能在 Safari、Chrome 和 Opera 中修复。那么如何将样式应用到与所有浏览器交叉兼容的元素上呢?有没有 CSS 库可以帮助我们?非常感谢您提供的任何见解。
谢谢。
自然LV
I'm working on a web development project where i need to take care of the design and working of the application. I found it very hard to style my UI which should be compatible will all the prominent browsers.
For example to align the text inside a div i gave
text-align:center
which worked only in IE and not in Firefox, Safari, Chrome and Opera. So i gave the Mozilla CSS style
text-align:-moz-center
which appears to fix the position only in Firefox and not in Safari, Chrome and Opera. So how to apply styles to the elements that are cross-compatible with all the browsers? Are there any CSS libraries to help us here? Any insights provided are very much appreciated.
Thank you.
NLV
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
类似地,有 CSS 重置和 CSS 框架之类的东西。
CSS Reset 将元素的所有默认值设置为 0,这样您之后构建的任何内容在所有浏览器中都将相同,例如 YUI Reset
http://developer.yahoo.com/yui/reset/
您可以使用的框架称为蓝图
http://www.blueprintcss.org/
Kind-of, there is a such thing as a CSS Reset and a CSS Framework.
CSS Reset sets all default values of elements to 0 so that anything you build after that will be the same in all browsers, such as YUI Reset
http://developer.yahoo.com/yui/reset/
A framework you could use is called blueprint
http://www.blueprintcss.org/