Chrome 的 Firebug Lite 破坏了悬停效果和鼠标悬停事件 [英] Firebug Lite for Chrome spoils hover effect and mouseover event

查看:18
本文介绍了Chrome 的 Firebug Lite 破坏了悬停效果和鼠标悬停事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个奇怪的问题:当使用 Firebug Lite for Chrome,有时悬停不起作用.

I've got a weird issue: when using Firebug Lite for Chrome, sometimes hover does not work.

我所拥有的:像这样的 div:

What I've got: a div like this:

<div class="editWindow">
    <ul>
        <li id="edCha" onclick="channels.add()">
            Редактировать канал
        </li>
        <li id="delCha" onclick="channels.chanLink()">
            Подключить клиента
        </li>
    </ul>
</div>

还有这个 CSS:

.editWindow li:hover, .chooseAction li:hover {
    background: #369;
    color: white;
    cursor: pointer;
}

当我第一次打开页面然后激活 Firebug 时,一切看起来都是这样的:

It all looks like this, when I first open the page and then activate Firebug:

但是,如果我先激活 Firebug,然后打开此页面,悬停将不起作用.我在 Firebug 控制台中没有看到任何错误,也没有悬停效果,就像这样(鼠标指针在那里,相信我):

But if I first activate Firebug and then open this page, hover just doesn't work. I see no error in the Firebug console, and no hover effect, like this (the mouse pointer is there, believe me):

我只在 Win7 和 Linux (Mint 14) 上的 Chrome(Firefox 运行良好)中遇到了这个问题.

I've got this issue only in Chrome (Firefox works well), both on Win7 and on Linux (Mint 14).

原因可能是什么?我很困惑.

What can the cause be? I'm confused.

当使用强制元素状态时->:hover 在开发工具菜单中,悬停样式有效.

When using Force element state -> :hover in the dev-tools menu, the hover style works.

我已将 onmouseover="alert('test');" 添加到这些 li 元素之一.在第二种情况下,alert 甚至没有被调用!

I've added onmouseover="alert('test');" to one of these li elements. In the second case, alert is not even being called!

推荐答案

这可能不是您真正需要的,但如果您使用通常的 Chrome Developer Tools 而不是 Firebug for Chtome,您可以强制元素具有一定的状态.只需右键单击元素树中的元素,然后在 Force Element State 菜单项中选择任何状态.对于修改 CSS 非常有用.恕我直言,最好在 Chrome 中使用本机工具,尽管 Firebug 可能更有用.

This might be not what you actually need, but if you use usual Chrome Developer Tools instead of Firebug for Chtome you can force an element to have a certain state. Just right-click on element in elements tree and choose any state in Force Element State menu item. Very useful for modifying CSS. IMHO it is better to use native tools in Chrome, albeit Firebug can be more useful.

这篇关于Chrome 的 Firebug Lite 破坏了悬停效果和鼠标悬停事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆