[英]Inline styling with DOM - backgroundColor property not being recognised
为什么按钮的背景没有变成蓝色?
but.style.setProperty('height', '200px'); but.style.setProperty('backgroundColor', 'blue');
<button id="but">I am a button</button>
它的background-color
。 来源
but.style.setProperty('height', '200px'); but.style.setProperty('background-color', 'blue');
<button id="but">I am a button</button>
使用background-color
css 属性。
but.style.setProperty('height', '200px'); but.style.setProperty('background-color', 'blue');
<button id="but">I am a button</button>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.