js获取字体颜色

2017-12-07  本文已影响0人  呼兰呦

console.log(getComputedStyle(ttitle[i]).color);

if (getComputedStyle(ttitle[i]).color=="rgb(0, 0, 0)") {

ttitle[i].style.color ='#10adff';

}else{

ttitle[i].style.color ='#000';

}

需要个字体设置颜色让rgb=000

.ttitle{

text-align: left;

color: #000;

}

上一篇 下一篇

猜你喜欢

热点阅读