markdown 伪类和伪元素

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown 伪类和伪元素相关的知识,希望对你有一定的参考价值。

## 伪类

>The pseudo-class concept is introduced to permit selection based on information that lies outside of the document tree or that cannot be expressed using the other simple selectors.

## 伪元素

>Pseudo-elements create abstractions about the document tree beyond those specified by the document language. For instance, document languages do not offer mechanisms to access the first letter or first line of an element's content. Pseudo-elements allow authors to refer to this otherwise inaccessible information. Pseudo-elements may also provide authors a way to refer to content that does not exist in the source document (e.g., the ::before and ::after pseudo-elements give access to generated content).

[浅谈CSS中的伪元素和伪类](https://www.w3cschool.cn/css_series/css_series-pwkt24q2.html)

注:css2之前伪元素和伪类都用一个冒号表示,但是css3之后为了区分两者,伪类采用一个冒号来表示,伪元素采用两个冒号来表示

以上是关于markdown 伪类和伪元素的主要内容,如果未能解决你的问题,请参考以下文章

伪类选择器,伪类和伪元素的区别

浅谈css伪类和伪元素的区别、优先级

HTML中常见伪类和伪元素的区别

伪类和伪元素

伪类和伪元素的区别

伪类和伪元素有啥区别?