What is the default display property of the :before and :after pseudo-elements?

前端 未结 1 623
不思量自难忘°
不思量自难忘° 2020-12-09 23:55

What is the default display: properties of :AFTER and :BEFORE pseudoelements after you specify content.

Is it display: inline

1条回答
  •  庸人自扰
    2020-12-10 00:35

    The :before and :after pseudo-elements are inline by default.

    As the W3 spec says:

    In a :before or :after pseudo-element declaration, non-inherited properties take their initial values.

    And the initial value of the display property is inline.

    0 讨论(0)
提交回复
热议问题