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;(多个设置)
posted @ 2015-02-03 16:03  一丁o  阅读(242)  评论(0编辑  收藏  举报