【发布时间】:2013-10-26 02:42:17
【问题描述】:
在上面的测试页面上按“继承”按钮。
在通过execCommand 使用inherit 到color 运行foreColor 命令后,它显示为奇怪的颜色 - #BA0000。 (在 Chrome 30 中测试)
看起来 Chrome 尝试使用 rgba(0, 0, 0, 0) 设置文本颜色,但它被解析为最后六个字符 - 'b, a, 0, 0, 0, 0'。所以它转向#BA0000。
但是inherit 上的backColor 命令效果很好。
这是 Chrome 的错误吗?还是禁止在foreColor 命令上使用inherit?
添加)
我只是使用styleWithCSS 而不是处理<font color> 的东西。
应用styleWithCSS 后,格式化命令使用带有<span> 元素的css 属性而不是<font>。
【问题讨论】:
标签: css google-chrome contenteditable execcommand