1

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

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

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

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

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

4

1 回答 1

1

它不是专门为 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";

于 2011-02-09T15:48:08.643 回答