Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

See :hover state in Chrome Developer Tools

I want to see the :hover style for an anchor I'm hovering on in Chrome. In Firebug, there's a style dropdown that allows me to select different states for an element.

I can't seem to find anything similar in Chrome. Am I missing something?

like image 538
Ben Avatar asked Dec 23 '10 01:12

Ben


People also ask

How do I show hidden elements in Chrome?

VIEW HIDDEN ELEMENTS: The extension makes visible those elements hidden by the "display:none", "type=hidden", and "visibility=hidden" attributes / styles. To do this hit LazySec's "Show Hidden Elements" button.

How do you force a hover state?

Right-click your element. Choose "Force element state" and then the state you want (e.g. :hover) Dance.


2 Answers

EDIT: This answer was before the bug fix, see tnothcutt's answer.

This was a bit tricky, but here goes:
  • Right-click element, but DON'T move your mouse pointer away from the element, keep it in hover state.
  • Choose inspect element via keyboard, as in hit up arrow and then Enter key.
  • Look in developer tools under Matched CSS Rules, you should be able to see :hover.

PS: I tried this on one of your question tags.

like image 27
Babiker Avatar answered Sep 28 '22 11:09

Babiker


Now you can see both the pseudo-class rules and force them on elements.

To see the rules like :hover in the Styles pane click the small :hov text in the top right.

Toggle element state

To force an element into :hover state, right click it and select :hover.

Force element state

Additional tips on the elements panel in Chrome Developer Tools Shortcuts.

like image 200
Travis Northcutt Avatar answered Sep 28 '22 12:09

Travis Northcutt