HTML CSS里面为什么不能用 *{margin:0; padding:0;}?
1个回答
展开全部
星号代表 全部 就是全部样式的 外边距 和 内边距都为0; 意思就是写CSS之前把所有浏览器的默认样式统一了
然后在写CSS样式就OK了 这些样式叫重置文件
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 { border: 0 none; font-family: inherit; font-size: 100%; font-style: inherit; font-weight: inherit; margin: 0; outline: 0 none; padding: 0; }
:focus { outline: 0 none; }
table { border-collapse: collapse; border-spacing: 0; }
caption, th, td { font-weight: normal; text-align: left; }
a img, iframe { border: medium none; }
ol, ul { list-style: none outside none; }
input, textarea, select, button { font-family: inherit; font-size: 100%; }
body { font-family: "宋体"; font-size: 12px;}
然后在写CSS样式就OK了 这些样式叫重置文件
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 { border: 0 none; font-family: inherit; font-size: 100%; font-style: inherit; font-weight: inherit; margin: 0; outline: 0 none; padding: 0; }
:focus { outline: 0 none; }
table { border-collapse: collapse; border-spacing: 0; }
caption, th, td { font-weight: normal; text-align: left; }
a img, iframe { border: medium none; }
ol, ul { list-style: none outside none; }
input, textarea, select, button { font-family: inherit; font-size: 100%; }
body { font-family: "宋体"; font-size: 12px;}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询