.css( ) js中设置css样式

给p标签设置样式,多个样式时用{ }对象包裹,中间每个属性值用逗号“ ,”隔开

$('p').css({"width":"30px","height":"30px"});
$(".redPage").css({"background-image":"url(${base}/resources/shop/mobile/images/redPage/redPage.png)"});
原文地址:https://www.cnblogs.com/duhui/p/11898424.html