📜  javascript css - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:22.560000             🧑  作者: Mango

代码示例6
div.style.color = 'blue';                                      
// adds the indicated style rule

div.style.cssText = 'color: blue; background: white';          
// adds several style rules

div.setAttribute('style', 'color: blue; background: white');    
// adds several style rules