简体   繁体   English

如何在Firebug中找到哪个JavaScript函数更改了CSS?

[英]How to locate in Firebug which JavaScript Function changed the CSS?

Firebug is probably the best debugging tool that makes the life easy for developers. Firebug可能是最好的调试工具,可以让开发人员轻松生活。 But one thing that I am not able to find out is how do you locate the function that changed the CSS values. 但是我无法找到的一件事是你如何找到改变CSS值的函数。 In the Right Panel, when you click on any CSS rule, it will select the HTML node in the left and you get to know that these values belong to this HTML element. 在右侧面板中,当您单击任何CSS规则时,它将选择左侧的HTML节点,您将知道这些值属于此HTML元素。

Is there any way that lets you find which javascript function modified the CSS. 有没有什么方法可以让你找到哪个javascript函数修改了CSS。 This is shown in firebug as 这在萤火虫中显示为

element.style{
  color:#898980;
  top:78px;
  bottom:121px;

} 

I need to find which JS function changed the above values as it is not in my CSS. 我需要找到哪个JS函数改变了上面的值,因为它不在我的CSS中。

The one highlighted in below Image 下图中突出显示的那个

在此输入图像描述

In the HTML panel, on the element whose style is changed : Right-click => break on attribute change. 在HTML面板中,在样式更改的元素上:右键单击=>中断属性更改。

This will break every time an attribute of this element is changed. 每次更改此元素的属性时,这都会中断。

See also: http://www.softwareishard.com/blog/firebug/firebug-tip-break-on-html-mutation/ 另见: http//www.softwareishard.com/blog/firebug/firebug-tip-break-on-html-mutation/

Florent 弗洛朗

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM