當前位置:編程學習大全網 - 編程軟體 - HTML CSS裏面為什麽不能用 *{margin:0; padding:0;}?

HTML CSS裏面為什麽不能用 *{margin:0; padding:0;}?

星號代表 全部 就是全部樣式的 外邊距 和 內邊距都為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;}

  • 上一篇:fork()問題
  • 下一篇:考濰坊科技學院的研究生怎麽樣
  • copyright 2024編程學習大全網