JQ系列:css操做

JQ中的  .css()有三種使用方法:
  1. $('#p').css('width'); 取得ID爲p的樣式屬性的width值;等同 return width
  2. $('#p').css('width','100px'); 設置ID爲p的樣式屬性 width : 100px;(單個設置)
  3. $('#p').css({'width':'100px','height':'100px' }); 設置ID爲p的樣式屬性 width : 100px;height: 100px;(多個設置)
相關文章
相關標籤/搜索