Home  >  Q&A  >  body text

在CSS3里面::和:的区别?

两个::和一个:到底是什么区别呢???

phpcn_u274phpcn_u2742815 days ago1045

reply all(2)I'll reply

  • 数据分析师

    数据分析师2017-09-30 23:52:29

    What is the difference between :: and : in CSS3? -PHP Chinese website Q&A-What is the difference between :: and : in CSS3? -PHP Chinese website Q&A

    Take a look around and learn.

    reply
    0
  • 阿神

    阿神2017-01-09 16:28:36

    伪元素和伪类之所以这么容易混淆,是因为他们的效果类似而且写法相仿,但实际上 css3 为了区分两者,已经明确规定了伪类用一个冒号来表示,而伪元素则用两个冒号来表示。

    但因为兼容性的问题,所以现在大部分还是统一的单冒号,但是抛开兼容性的问题,我们在书写时应该尽可能养成好习惯,区分两者。

    reply
    0
  • Cancelreply