gpt4 book ai didi

javascript - CSS样式信息库

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:37:30 24 4
gpt4 key购买 nike

有没有人知道一个好的 javascript 库可以为 DOM 中的给定元素获取原始(即未计算)样式?换句话说,可以用来在 Firebug 的样式选项卡中生成结果。与 Firebug 一样,它应该考虑继承、快捷方式属性以及 CSS 的所有其他细微差别。

最佳答案

根据评论,您可能对一个不错的 firebug lite bookmarkmarklet 链接感兴趣:

http://www.latentmotion.com/how-to-use-firebug-in-ie6-and-all-other-browsers/

在我发现 firebug lite 之前,我开始使用我自己的自定义版本:

http://latentmotion.com/jquery-bookmarklet/

(注意:点击“显示框边界”,然后点击页面上的一个html标签,右侧会出现样式属性,也可以作为小书签使用)

为了完成上述小书签,我使用了(链接和数组):

http://www.latentmotion.com/jquery-bookmarklet/example-jquery-bookmarklet.js

        var allStyles = ["azimuth","background" ,"backgroundAttachment","backgroundColor","backgroundImage","backgroundPosition","backgroundRepeat","border","borderBottom","borderBottomColor","borderBottomStyle","borderBottomWidth","borderCollapse","borderColor","borderLeft","borderLeftColor","borderLeftStyle","borderLeftWidth","borderRight","borderRightColor","borderRightStyle","borderRightWidth","borderSpacing","borderStyle","borderTop","borderTopColor","borderTopStyle","borderTopWidth","borderWidth","bottom","captionSide","clear","clip","color","content","counterIncrement","counterReset","cssFloat","cue","cueAfter","cueBefore","cursor","direction","display","elevation","emptyCells","font","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","height","left","letterSpacing","lineHeight","listStyle","listStyleImage","listStylePosition","listStyleType","margin","marginBottom","marginLeft","marginRight","marginTop","markerOffset","marks","maxHeight","maxWidth","minHeight","minWidth","orphans","outline","outlineColor","outlineStyle","outlineWidth","overflow","padding","paddingBottom","paddingLeft","paddingRight","paddingTop","page","pageBreakAfter","pageBreakBefore","pageBreakInside","pause","pauseAfter","pauseBefore","pitch","pitchRange","playDuring","position","quotes","richness","right","size","speak","speakHeader","speakNumeral","speakPunctuation","speechRate","stress","tableLayout","textAlign","textDecoration","textIndent","textShadow","textTransform","top","unicodeBidi","verticalAlign","visibility","voiceFamily","volume","whiteSpace","widows","width","wordSpacing","zIndex"];

如果有人知道更好的方法,我也很想听听:)

关于javascript - CSS样式信息库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2965025/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com