我想看到:hover样式的锚,我在Chrome中徘徊。在Firebug中,有一个样式下拉菜单,允许我为一个元素选择不同的状态。
我似乎在Chrome中找不到任何类似的东西。我遗漏了什么吗?
我想看到:hover样式的锚,我在Chrome中徘徊。在Firebug中,有一个样式下拉菜单,允许我为一个元素选择不同的状态。
我似乎在Chrome中找不到任何类似的东西。我遗漏了什么吗?
当前回答
It's also possible that the code can be hidden in the database and there is no actual file containing it. A client of mine has the "Travelify" theme by Colorlib and some of the options from the WP admin GUI write directly to the DB and the DB generates the css code on the fly - I can see the css in html source but nowhere in any actual files. This drove me crazy and took me awhile to figure out. There's a great DB search tool for WP called "Search and Replace" by Inpsyde GmbH that I have found to be invaluable. Be careful with it of course!
干杯!
其他回答
对我来说,为了调试这个工具提示,我点击切换设备工具栏切换到移动视图,然后点击有悬停效果的div,你也可以点击焦点可见来查看div和工具提示之间的间距,希望这将有所帮助。
编辑:这个答案是在错误修复之前,见tnotcutt的答案。这有点棘手,但如下所示:
右键单击元素,但不要将鼠标指针移离元素,保持悬停状态。 通过键盘选择检查元素,就像点击箭头,然后回车键。 在开发工具中匹配的CSS规则下,你应该可以看到:hover。
PS:我在你的一个问题标签上试过这个方法。
使用JS可以触发元素上的MouseEvent。下面是如何对悬停进行操作。
使用右键单击检查元素。 像这样复制JS路径 在Sources Chrome DevTools中按“Esc”键打开控制台。 然后粘贴复制的路径,并添加.dispatchEvent(new MouseEvent('mouseover', {'bubbles': true}));是这样的: 按enter键,然后可以与悬停状态后发生的任何DOM更改进行交互。
现在可以看到两个伪类规则,并将它们强加到元素上。
要查看样式窗格中的:hover之类的规则,单击右上方的小:hov文本。
要强制一个元素进入:hover状态,右键单击它并选择:hover。
在Chrome开发人员工具快捷方式的元素面板上的额外提示。
在Chrome浏览器中更改悬停状态非常简单,只需遵循以下步骤:
1)在你的页面上右键点击,选择检查
2)在DOM中选择你想检查的元素
3)选择引脚图标(Toggle Element State)
4)然后勾选悬停
现在您可以在浏览器中看到所选DOM的悬停状态!