查看YUI 2: Reset CSS,他们在多个元素上设置了margin:0
和padding:0
。我不关心我的网页上的IE6或IE7。我还需要为每个元素设置margin:0
吗?
我还需要为每个元素设置padding:0
吗?
我还需要为图片设置border:0
吗?
答:仅适用于链接图片
你推荐的其他什么?
答案 0 :(得分:3)
您可以在此网站上查找IE的内置样式表:http://www.iecss.com/
它包含Firefox,WebKit和Opera风格的链接。您可以交叉引用这些来做出决定。
答案 1 :(得分:0)
我总是使用这个:
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,
b, u, i, center,
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-size: 100%;
vertical-align: baseline;
background: transparent;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
/* remember to define focus styles! */
:focus {
outline: 0;
}
/* remember to highlight inserts somehow! */
ins {
text-decoration: none;
}
del {
text-decoration: line-through;
}
/* tables still need 'cellspacing="0"' in the markup */
table {
border-collapse: collapse;
border-spacing: 0;
}