有没有用于 Web 开发的通用 CSS 库?

发布于 2024-09-06 04:12:53 字数 411 浏览 2 评论 0原文

我正在从事一个网络开发项目,我需要负责应用程序的设计和工作。我发现很难设计我的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

九公里浅绿 2024-09-13 04:12:53

类似地,有 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/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文