对于想要改善跨浏览器体验的现有仅 IE 站点的 CSS 重置表?

发布于 2024-10-16 18:48:44 字数 416 浏览 8 评论 0原文

我正在开发一个内部自定义 ASP.NET 站点,该站点由客户指定只需要在 Internet Explorer 中工作。这意味着没有提供任何资源来确保它在其他浏览器中工作并且看起来不错,尽管没有使用奇特的仅 IE 技术或类似的技术。

由于最终有人会希望其他浏览器也能工作,我想知道是否存在像 CSS Reset 样式表这样的东西可以帮助使其他浏览器布局更像 IE。

我正在寻找一个重置样式表,专门用于使 Firefox、Chrome 等的行为更像 IE(我确信没有人会对此留下令人讨厌的评论),这不会破坏太多现有布局(经过测试)目前仅适用于 IE7)。

我知道我还会遇到 Javascript 等方面的其他问题,但这个问题仅与 CSS/布局有关。

简而言之,是否存在 CSS 重置表来将 CSS“重置”为 IE 默认值?

I am working on an internal, custom ASP.NET site that was specified by the customer to only require working in Internet Explorer. This means that no resources have been put forward to make sure it works and looks nice in other browsers, although there is no exotic IE-only technology used or anything like that.

Since eventually someone is going to want other browsers to work, I was wondering if there exists something like a CSS Reset stylesheet that can help make other browsers layout more like IE.

I am looking for a reset stylesheet specifically intended to make Firefox, Chrome, etc, behave more like IE (I'm sure nobody will leave obnoxious comments about this), that won't break too much of the existing layout (which is tested currently only on IE7).

I know I'll have other issues with Javascript, etc, but this question is only about CSS/layout.

In short, does a CSS Reset sheet exist to "reset" CSS to the IE defaults?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

情愿 2024-10-23 18:48:44

它不是专门为 IE 设计的,但你可以使用它 - 它真的不会有太大区别,你真正需要做的是应用它,然后调整现有的样式,使其在所有浏览器中看起来都相同。


html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
/* remember to define focus styles! */
:focus {
outline: 0;
}
body {
line-height: 1;
color: black;
background: white;
}
ol, ul {
list-style: none;
}
/* tables still need ‘cellspacing=”0″‘ in the markup */
table {
border-collapse: separate;
border-spacing: 0;
}
caption, th, td {
text-align: left;
font-weight: normal;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: “”;
}
blockquote, q {
quotes: “” “”;
}

将其放在单独的 .css 文件中,并使用以下命令调用主 styles.css 文件的顶部: @import "reset.css";

It's not specifically designed for IE but you could use this - It really wont make much difference, what you really need to do is apply it then adapt your existing styles so it looks the same in all browsers.


html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
/* remember to define focus styles! */
:focus {
outline: 0;
}
body {
line-height: 1;
color: black;
background: white;
}
ol, ul {
list-style: none;
}
/* tables still need ‘cellspacing=”0″‘ in the markup */
table {
border-collapse: separate;
border-spacing: 0;
}
caption, th, td {
text-align: left;
font-weight: normal;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: “”;
}
blockquote, q {
quotes: “” “”;
}

Ass it in a separate .css file and call into the top of your main styles.css file using: @import "reset.css";

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