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;
}
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;
}
本文标题:js获取字体颜色
本文链接:https://www.haomeiwen.com/subject/zygubxtx.html
网友评论