【问题标题】:CSS reset with presentational and deprecated tags使用演示和弃用标签重置 CSS
【发布时间】:2010-01-21 17:00:41
【问题描述】:

为什么 Eric Meyer 在他的 css reset 中没有可取的、展示性的、不推荐使用的和非语义标签? (即applet、iframe、big、s、small、strike。)

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;
}

【问题讨论】:

    标签: css w3c web-standards


    【解决方案1】:

    不幸的是,人们仍在使用它们。在样式表中引用不推荐使用的元素并没有什么无效的。在您的标记中实际使用它们是无效的。 Meyer 的重置是修复你的元素渲染方式,而不是修复你选择使用的元素。

    【讨论】:

      【解决方案2】:

      这是对重置的“以防万一”。实际上,他过去曾建议不要使用已弃用的标签。

      如果您正在追随 Meyer、Cederholm、Collison 等标准专家。 al.,那么您可能应该已经知道无论如何都不要使用它们。

      【讨论】:

        猜你喜欢
        • 2020-07-16
        • 2022-11-28
        • 1970-01-01
        • 2010-12-06
        • 2020-12-18
        • 2012-08-10
        • 2018-12-23
        • 1970-01-01
        • 2010-11-23
        相关资源
        最近更新 更多