Inspect hovered element in Chrome?

前端 未结 21 1449
小鲜肉
小鲜肉 2020-12-22 17:44

I am trying to view, through Chrome\'s developer tools, how tooltips are structured on a site. However, even when I am hovered over the item, when I \"inspect element\", not

相关标签:
21条回答
  • 2020-12-22 18:02

    1)Open the Inspect window by clicking F12

    2)Go to source tab(next to console)

    3)Now hover on element to be inspected and keep your mouse over there.

    4)Using keyboard(Tab or shift+tab) to move the control to pause button or F8Refer the image

    5)When keyboard focus is on Play button. Hit enter. Your hover element will be freezed you can do anything now

    0 讨论(0)
  • 2020-12-22 18:06

    One of the easiest ways I found is:

    1. Open Chrome dev tools on the side

    2. Hover over element

    3. Right-click

    4. Click on dev tools

    5. Now you can inspect and change styles

    0 讨论(0)
  • 2020-12-22 18:08

    No code solution for JS activated tooltips:

    With Chrome's devtools inspect the containing / parent element of the tooltip. In the "elements" tab, right click on that container DOM element then choose "break on" > "subtree modifications". The next time you hover over the part of the DOM the tooltip is housed in, the JS code will be paused allowing you to inspect the contents of the tooltip.

    0 讨论(0)
  • 2020-12-22 18:08

    For some reason the answers provided here weren't working for me on Windows. I was able to inspect the tooltip by opening the dev tools, then hovering over the element that brings up the tooltip, then right clicking on that element (not the tooltip). Then, move the cursor over into the inspector panel and scroll down to the bottom. The tooltip element should still be there.

    0 讨论(0)
  • 2020-12-22 18:09

    I had problems with this so I went to the documentation and inspected the tooltip that is already rendered on the page. That helped me see the dom structure of the tooltip and edit it accordingly.

    0 讨论(0)
  • 2020-12-22 18:17

    Here is how I did it on Mac:

    1. Hover over the element that has a tooltip with chrome devtools opened.
    2. Wait for the tooltip to appear.
    3. Open devtools command palette with a keyboard shortcut. Cmd+Shift+P worked for me.
    4. Type in Disable JavaScript and press Enter

    This will prevent from fading all the tooltips that utilize JavaScript.

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