jquery的css()函数同时设置多个css属性值 $("p").css({ "color": "#ff0011", "background": "blue" }); 参考来源:https://jquery.cuishifeng.cn/css.html