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({
                    width:"100px",
                    heigth:"100px",
                    bacdground:"red"
                });

posted @ 2019-06-25 13:02  ilovetesting  阅读(146)  评论(0编辑  收藏  举报