【CSS 】js操作css

对设置和移除所有 <p> 元素的 "main" 类进行切换:

$("button").click(function(){
  $("p").toggleClass("main");
});

 

posted @ 2020-01-24 14:05  一只桔子2233  阅读(112)  评论(0)    收藏  举报