CSS Tutorial

Coming Tutorials

>Home>CSS Tutorial>Psuedo Elements

CSS Tutorial

Coming Tutorials



Psuedo Elements

A Pseudo element is a CSS technique to set the style to part of the element. Uses double colon "::"

• select first line in the paragraph

• select first character of a paragraph.

• add content before or after of an element.

• change color if content is selected using mouse.

Example A:

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

Example B:

li::before {
css property : value;
}

Example C:

li::selection {
css property : value;
}


Share the article to help your friends