你能让 Firebug 中的悬停状态“粘性”吗?

发布于 2024-09-30 17:39:06 字数 225 浏览 7 评论 0原文

当我调试站点时,有时悬停的选择器有点冗长并且与其他选择器类似,有没有办法在 Firebug 中应用一种“粘性”状态来悬停规则?

例子;我将鼠标悬停在导航栏上,想要从 firebug 中复制选择器以在 CSS 中进行搜索,但是只要我移动鼠标,选择器(显然)就会随着导航

  • 消失不再悬停。
  • 有办法做到这一点吗?

    谢谢 :)

    When I'm debugging a site, sometimes the hovered selectors are a little long winded and similar to other ones, is there a way to apply a kind of "sticky" state to hover rules in Firebug?

    Example; I hover over a nav bar and want to copy the selector out of firebug to search in the CSS, but as soon as I move my mouse, the selector (obviously) disappears as the nav <li> isn't hovered anymore.

    Any way to do this?

    Thanks :)

    如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

    扫码二维码加入Web技术交流群

    发布评论

    需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

    评论(5

    黑寡妇 2024-10-07 17:39:06

    检查链接时,Firebug 显示默认 CSS 状态,即应用于 a:link 的样式。默认情况下,不显示 :hover 和 :active 样式。幸运的是,您可以通过单击“样式”并选择适当的选项来更改链接的状态:

    在此处输入图像描述

    When inspecting links, Firebug shows the default CSS state, i.e. styles applied to a:link. By default, the :hover and :active styles are not shown. Fortunately, you can change the state of the link by clicking Style and choosing the appropriate option:

    enter image description here

    还在原地等你 2024-10-07 17:39:06

    对于我想要的,元素的 CSS 样式上方的 Style 下拉列表中有一个选项。只需单击下拉菜单,然后选择 :active:hover,它就会保留所选元素和悬停元素的样式:)

    For what I wanted, there's an option for it in the Style dropdown above the CSS styles for the element. Just click the dropdown, and select :active or :hover and it keeps the styles for the selected and hovered element :)

    段念尘 2024-10-07 17:39:06

    有时项目不受“:hover”状态的影响,而是受 jQuery 或类似内容中的鼠标悬停影响,在这种情况下,您可以通过编写以下内容在控制台选项卡中手动触发事件(或强制事件):

    $('#a-random-selector').mouseover()
    

    希望有帮助,我来到这里正在寻找这个答案,但必须自己找出答案

    Sometimes items are not affected by the ":hover" state but by a mouseover in jQuery or similar, in that case you can manualy trigger the event (or force the event) in the console tab by writing:

    $('#a-random-selector').mouseover()
    

    Hope it helps, I came here looking for this answer but had to figure it out myself

    來不及說愛妳 2024-10-07 17:39:06

    您可以尝试使用 Chrome 检查器,并在样式下的元素上触发 :active :visited 状态等。

    在此处输入图像描述

    You can try using Chrome inspector, and trigger :active :visited state etc.. on the element under styles.

    enter image description here

    苦笑流年记忆 2024-10-07 17:39:06

    打开 Firebug 和 Web Developer->Inspector。在检查器窗口中,找到悬停开始的代码行,右键单击鼠标并选择 :hover。然后悬停状态将保持,你可以在firebug中做任何你想做的事情。

    Open both firebug and web developer->Inspector. In the Inspector window, locate the code line where the hover starts, right click the mouse and choose the :hover. Then the hover state will stay, you can do whatever you want in firebug.

    ~没有更多了~
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文