Css pseudo-element ::before(2); :before and ::before

前端 未结 1 1125
耶瑟儿~
耶瑟儿~ 2021-02-14 07:59

I\'m working with css and I have tried to add an element \'before\' to my div like an arrow. Is there any way to achieve it? I tried pseudo :before but there are three of them (

相关标签:
1条回答
  • 2021-02-14 08:32

    The CSS spec on content describes all three syntaxes.

    • :before -- outdated syntax for pseudo elements. Use if older browser support is needed such as IE8. IE9 supports the new syntax. It also seems like iOS Safari does not support the new syntax
    • ::before -- new pseudo element syntax. This is equivalent to ::before(1)
    • ::before(n) -- used to create multiple before elements that can be before other ::befores. Details are in the same spec.
    • As far as I can tell, no browser supports this.
      • http://jsfiddle.net/535Rf/
    0 讨论(0)
提交回复
热议问题