【问题标题】:How can I get the current color of an element that is mid-transition in Chrome / WebKit?如何获取 Chrome / WebKit 中过渡的元素的当前颜色?
【发布时间】:2011-10-15 06:41:03
【问题描述】:

我在 chrome 中有一个颜色过渡。我想随时使用 JavaScript 检索颜色。目前,我正在访问 DOM 中的 .style.color,但这只会给我目标值。

编辑这是不久前回答的,可以在此处查看 chrome 的示例http://nu11.co.uk/

【问题讨论】:

    标签: javascript dom google-chrome css webkit


    【解决方案1】:

    getComputedStyle([element],"").getPropertyValue([property])应该返回过渡中的颜色(但我没有检查它。)

    【讨论】:

    • 我想我爱你。 getComputedStyle( [元素], null ).color
    猜你喜欢
    • 2018-09-19
    • 2021-01-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-06-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多