JQ中的 .css()有三种使用方法:
-
$('#p').css('width');取得ID为p的样式属性的width值;等同 return width $('#p').css('width','100px');设置ID为p的样式属性 width : 100px;(单个设置)$('#p').css({'width':'100px});','height':'100px'设置ID为p的样式属性 width : 100px;height: 100px;(多个设置)
JQ中的 .css()有三种使用方法:
$('#p').css('width'); 取得ID为p的样式属性的width值;等同 return width$('#p').css('width','100px'); 设置ID为p的样式属性 width : 100px;(单个设置)$('#p').css({'width':'100px','height':'100px' }); 设置ID为p的样式属性 width : 100px;height: 100px;(多个设置)相关文章: