What is the difference between :before and ::before?

后端 未结 5 1768
天命终不由人
天命终不由人 2020-12-02 17:52

I just saw a CSS code that included ::before tag. I looked at MDN to see what the ::before is but I really didn\'t understand it.

Can some

5条回答
  •  我在风中等你
    2020-12-02 18:50

    One is the CSS2 (:before) way and the other is CSS3 (::before). Currently they are interchangeable in browsers that support CSS2 & CSS3.

    Here's a good explanation: http://www.impressivewebs.com/before-after-css3/

提交回复
热议问题