Skip to content

CSS 通配符 #37

@paddingme

Description

@paddingme
  • 会影响 css 属性继承。

例如

<p>xx<span>oo</span></p>
* {
  font-size: 14px;
} 

p { font-size: 16px}

span 不会继承 16,而会默认接受 通配符字体大小。

可以使用:

* {
  font-size:inhreit;
}

修改

使用 通配符对 网页渲染曾在性能问题,因为需要不断继承,改写通配符的样式。

另如上所述不便于维护,debug。

所以 CSS 文件中写通配符的没小 JJ。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions