I am trying to set a variable to be the value of my div
border-color
property value
errorChartColorError = $('.col__item.error').css('border-color');
This works fine in Chrome but Internet Explorer 11 returns the variable as undefined
When I inspect the element in IE, I can see the border-color property and value
Do I need an IE hack?
答案 0 :(得分:1)
边框颜色可以有多达四个值;这意味着您可以为每个边框(底部,左侧,顶部,右侧)设置不同的颜色。 更具体地说明你要回溯哪一个,所以:
$(".col__item.error").css("border-top-color");
或
$(".col__item.error").css("border-left-color");
等等......
应该做的伎俩