CSS重置与*通配符 [英] CSS Reset vs * wild card
本文介绍了CSS重置与*通配符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
为什么我不能简单地重置:
Why cant I just do a simple reset of:
* {边距:0;填充:0;字体大小:100%}
代替:
html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, address, cite, code,
del, dfn, em, img, ins, kbd, q, samp,
small, strong, sub, sup, var,
b, i,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, figcaption, figure,
footer, header, hgroup, menu, nav, section, summary,
time, mark, audio, video {
margin:0;
padding:0;
border:0;
outline:0;
font-size:100%;
vertical-align:baseline;
background:transparent;
}
推荐答案
首先,您可以
回答问题:因为您可能不希望所有元素都具有指定的参数.例如,您那里没有输入,按钮等.
Answering the question: because you probably don't want to have all elements with specified parameters. For example you do not have inputs, buttons etc. there.
这篇关于CSS重置与*通配符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文