Skip to Content
Practical Web Design
book

Practical Web Design

by Philippe Hong
April 2018
Beginner content levelBeginner
368 pages
7h 37m
English
Packt Publishing
Content preview from Practical Web Design

CSS pseudo-classes

A pseudo-class is used to define a special state of an element. For example, when you hover or when you click on a button, a state can be activated. 

We're going to learn two easy pseudo-classes for the moment, the most common ones. You can easily add and activate other pseudo-classes when you know how to use them:

Different pseudo-classes

The two pseudo-classes are hover and active. The hover state is used when you hover over an element with the mouse. It's useful to show that the element is clickable. The active state, on the other hand, is used when you click on an element. 

To use these pseudo-classes, you simply have ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Web Design Playground

Web Design Playground

Paul McFedries
Hello Web Design

Hello Web Design

Tracy Osborn
The Principles of Beautiful Web Design, 4th Edition

The Principles of Beautiful Web Design, 4th Edition

Jason Beaird, Alex Walker, James George

Publisher Resources

ISBN: 9781788395038Supplemental Content