daily pastebin goal
23%
SHARE
TWEET

Untitled

a guest Mar 22nd, 2019 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 想要移除元素的某个css属性时,将属性赋值为空有时不能达到想要的效果,可以使用赋值为'initial'的方式
  2.  
  3. ```
  4. $('#ele').css('width','initial');
  5. ```
  6.  
  7. ```
  8. document.getElementById("ele").style.width="initial"; //document.getElementById(id).style.property=new style;
  9. ```
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top