What does pseudo mean in CSS?

When I read about CSS and HTML, I turn to the word pseudo-elements.

I did not find a good short explanation of what pseudo means. Can anyone explain this to me?

+4
source share
4 answers

Intended or intended to be, but not quite so; false; not genuine:

- https://en.oxforddictionaries.com/definition/pseudo-

A pseudo-element is that which acts as an element, but is not an element.

+6
source

psuedo-elements allow you to style specific parts of an element. Some examples of pseudo-elements:

  • ::after
  • ::before

.

:

.test {
    background-color: gray;
}

.test::after {
    content: ' some more text';
    color: red
}
<div class='test'>
    testing...
</div>
Hide result

.test

, , ::after, .

https://developer.mozilla.org/en/docs/Web/CSS/Pseudo-elements

+9

- -DOM-, CSS, , DOM . node DOM. , , , Chrome Dev Tools, node.

Interestingly, some screen readers read pseudo-element content, while others do not.

+1
source

Source: https://habr.com/ru/post/1664484/


All Articles