CSS Tutorial

Coming Tutorials

>Home>CSS Tutorial>Psuedo Elements

CSS Tutorial

Coming Tutorials



Psuedo Class

A Pseudo-Class is a CSS technique to set the style when the element changes its state. The pseudo class also selects the element based on their positions (first, last, even, odd)in the parent element.

The syntax uses single colon ":"

• Edit the style upon mouse hover event.

• Set the style when an element gets focus.

• Apply different styles for visited/unvisited links.

• Make stripped table.

Example A:

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

Example B:

li::first-child {
css property : value;
}

Example C:

li::last-child {
css property : value;
}


Share the article to help your friends