“Inspect” a hover element?

后端 未结 9 1894
借酒劲吻你
借酒劲吻你 2020-11-30 18:48

Note: I\'ve read similar threads, but none quite my issue - I can right click on it fine, it just then disappears.

I find \"Inspect Element\" an invaluable tool in C

相关标签:
9条回答
  • 2020-11-30 19:33

    If the hover is triggered by JS, just pause script execution via the keyboard. This is a much simpler way of freezing the DOM than the other answers suggest.

    Here's how you do it in Chrome. I'm sure Firefox has an equivalent procedure:

    1. Open up Developer Tools and go to Sources.
    2. Note the shortcut to pause script execution—F8.

    3. Interact with the UI to get the element to appear.

    4. Hit F8.
    5. Now you can move your mouse around, inspect the DOM, whatever. The element will stay there.
    0 讨论(0)
  • 2020-11-30 19:33

    Here's how I do it with no CSS changes or JS pausing in Chrome (I am on a Mac and do not have a PC in front of me if you are running on Win):

    1. have your developer console open.
    2. do not enable the hover inspection tool yet, but instead open up your desired sub menu by moving your mouse over it.
    3. hit Command+Shift+C (Mac) or Ctrl+Shift+C (Win/Linux)

    now the hover inspection tool will apply to the elements you have opened in your sub-nav.

    0 讨论(0)
  • 2020-11-30 19:44

    What worked for me is selecting the specific a tag I wanted to inspect and do this:

    enter image description here

    After doing the above, I would again normally select that a tag then the dropdown will automatically stay as-is even when I mouseover to other places like Inspect Element, etc.

    You can just refresh the browser when doing inspecting the menu dropdown elements to go back to normal state.

    Hope this helps. :)

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