Home >Web Front-end >HTML Tutorial >JQ series: css operation_html/css_WEB-ITnose

JQ series: css operation_html/css_WEB-ITnose

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-24 11:49:48929browse

JQ中的  .css()有三种使用方法:

  1. $('#p').css('width'); Get the width value of the style attribute with ID p; equivalent to return width
  2. $('#p').css('width','100px'); Set the style attribute with ID p to width: 100px; (single setting)
  3. $('#p').css( {'width':'100px','height':'100px' }); Set the style attribute with ID p to width: 100px; height: 100px; (multiple settings)

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn