Home>Article>Web Front-end> How to cancel style in css
How to cancel styles in css: 1. To remove all styles, use [removeattr ("style")]; 2. To remove a single style, use [css ("attribute", "")].
The operating environment of this tutorial: windows7 system, css3 version, DELL G3 computer.
How to cancel styles in css:
1. To remove all styles, use removeattr("style");
The removeAttr() method removes attributes from selected elements.
Syntax:
$(selector).removeAttr(attribute)
2. To remove a single style, use css ("property", "");
css() method setting or Returns one or more style properties of the selected element.
To set specific CSS properties, please use the following syntax:
css("propertyname","value");
Example:
Recommended related tutorials:CSS video tutorial
The above is the detailed content of How to cancel style in css. For more information, please follow other related articles on the PHP Chinese website!