Inspecting Hover-state in Firebug or Chrome DevTools

前端 未结 4 1845
一生所求
一生所求 2020-12-16 03:27

I\'ve got an HTML element that has a CSS hover-state. There\'s a bug with the margin or padding on hover and every time I mouseover, the contents of the element slide a lit

相关标签:
4条回答
  • 2020-12-16 03:36

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

    To see the rules like :hover in the Styles pane click the small dotted box button in the top right.

    To force an element into :hover state, right click the element.

    Alternatively, you can use Event Listener Breakpoints sidebar pane in the Scripts panel and select to pause in mouseover handlers.

    0 讨论(0)
  • 2020-12-16 03:45

    For testing :hover states in Chrome

    enter image description here

    For testing :hover state in Firefox (You need firebug add on)

    enter image description here

    0 讨论(0)
  • 2020-12-16 03:45

    Here's a screen shot for firebug & those not sharp enough to see agriboz's comment (like me)

    enter image description here

    0 讨论(0)
  • 2020-12-16 04:01

    Chrome Dev Tools has a built-in :hover state selector in the Elements > Styles panel. You can toggle other pseudo-classes (like :active) there as well.

    0 讨论(0)
提交回复
热议问题