jQuery css style manipulation

css style operation

  • ##$().css(name, value); //Settings

  • $().css(name); //Get

  • $().css(json object); //Modify multiple css at the same time Style

css() style operation features:① Style acquisition, jquery can obtain inline, Interior and exterior styles.
The dom method can only obtain inline styles
② Composite attribute styles need to be split into "specific styles" before they can be operated
For example: background needs to be split into background-color background-image, etc. for operation
border: border-left-style border-left-width border-left-color, etc.
margin: margin-left, margin-top, etc.

   php.cn    
欢迎大家学习jQuery


Continuing Learning
||
php.cn
欢迎大家学习jQuery
submit Reset Code
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!