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");