Selector- Pseudo-selector (Pseudo-element)

> (World Wide) Web - (W3|WWW) > Selector API

1 - About

Pseudo-elements are added to selectors to be able to select a sub-content of a content element. See CSS - Addessing model (through selector and properties).

They will also add an element into the flow.

This are not pseudo-class

Advertising

3 - Syntax

selector::pseudo-element {
  property: value;
}

4 - List

5 - Example

Below the pseudo element has an aqua border.

p::before{
   content: "What ever ... ";
   display: inline;
   border:1px solid aqua;
}
<p>This text will have "What ever" with an aqua border at its beginning</p>

6 - Documentation / Reference

Advertising
web/selector/pseudo_element.txt · Last modified: 2019/02/09 12:19 by 172.69.70.243