js中对style中的多个属性进行设值:

看一下案例自然就明白:

document.getElementById("my_wz1").style.cssText="background:#fff ; border-left: 1px solid #ccc;border-right: 1px solid #ccc;  margin-left: -1px;";

jquery

对css中多个属性设值

css({"propertyname":"value","propertyname":"value",...});

实例:

$("p").css({"background-color":"yellow","font-size":"200%"});

 

对css中的单个属性设值

$("p").css("background-color","yellow");

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-12
  • 2021-11-19
  • 2021-11-01
猜你喜欢
  • 2022-12-23
  • 2022-02-14
  • 2022-12-23
  • 2022-12-23
  • 2021-07-25
相关资源
相似解决方案