«   Previous tip Next tip   »

Chrome DevTools: How to trigger a CSS Pseudo class with DevTools

Last updated: 4th March 2021
How to trigger a CSS Pseudo class with DevTools

Introduction

Pseudo classes can be triggered on elements to investigate how an element may react if it were to be hovered over for example.

You can trigger the following Element States:

How to use this feature

You can right click on a node in the Elements panel and select Force element state. Alternatively, the Toggle element state icon can be clicked on in the Styles sub-pane.

When an element has some sort of state applied, you'll get a little visual indicator to the left of the nodes' opening tag and in some cases the closing tag too (if they are far apart).

«   Previous tip Next tip   »

Sign up to receive a developer tip, in the form of a gif, in your inbox each week