css({" propertyname ":" value "," propertyname ":" value ",...});

下面的例子将为所有匹配元素设置 background-color 和 font-size:

$ ( " p " ) . css ( { " background-color " : " yellow " , " font-size " : " 200% " } ) ;

尝试一下 »
  • #0
  •