* CSS hack 适用于哪些浏览器和版本?
我一直在寻找一种 hack 来解决我遇到的 CSS 问题。 我已使用其中一个为 Internet Explorer 创建自定义规则。
margin-top:45px;
*margin-top:0px;
这个 hack 是否适用于所有 IE 浏览器? 此黑客攻击是否出现在任何版本的 Firefox 或 Safari 中?
I have been looking at a hack to solve a CSS problem I have. I have used one to create a custom rule for Internet Explorer.
margin-top:45px;
*margin-top:0px;
Does this hack apply to all IE browsers? Does this hack appear in any versions of Firefox or Safari?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这适用于 IE7 及以下版本。 但请注意,这不是有效的 CSS,并且它随时可能会崩溃。 有关各种 CSS 黑客攻击及其影响的浏览器的更全面列表,请参阅此处。
我强烈建议您重新考虑您是否真的需要这种技巧,以及是否没有更好的方法来完成您想要的事情。
This applies to IE7 and below. But be aware that this is not valid CSS, and it could break at any time. See here for a more comprehensive list of the various CSS hacks and which browsers they affect.
I'd strongly recommend reconsidering whether you really need this hack, and if there isn't a better way to do what you want.