Pseudo Class Order

Posted By Balraj Singh | 31-Dec-2015

A pseudo class is often use for diffrent state on an element. For example style an element when user hover on it and when user visited a link etc.

 Pseudo class syntax:

selector:pseudo-class {
    property:value;
}
 

 

Pseudo class used in a order like when we have to use two or three pseudo class for same element then we have to follow pseudo class order, which is define blow:-

link, 

visited, 

hover, 

focus, 

active

 

we can remember this order by a slogan “ Lord Vader Hates Furry Animals”. In this slogan first letter of every word define the order of pseudo class.

selector:link {
    property:value;
}
selector:visited {
    property:value;
}
selector:hover {
    property:value;
}
selector:focus {
    property:value;
}
selector:active {
    property:value;
}
 

 

THANKS

Request for Proposal

Recaptcha is required.

Sending message..