jQuery操作CSS样式的方法


1、逐个设置
    $("div").css("width","100px");
    $("div").css("heigth","100px");
    $("div").css("bacdground","red");

2、链式设置
    $("div").css("width","100px").css("heigth","100px").css("bacdground","red");

3、批量设置
    $("div").css({
                    "100px",
                    heigth:"100px",
                    bacdground:"red"
                });

原文地址:https://www.cnblogs.com/yaoqingzhuan/p/11082237.html