我如何比较我从jQuery获得的颜色值,例如黑色值?
if ($('#element').css('color') == 'rgb(0,0)'){ // do something}
用您想要比较的颜色值的红色,绿色和蓝色值替换0,0.
.css() jQuery API