Adding css rules with text method to style element does not work in IE

后端 未结 6 1625
旧巷少年郎
旧巷少年郎 2020-12-05 14:08

It works fine in Firefox and Chrome, but does not work in IE8. Here is the html structure:



 
  

        
6条回答
  •  不思量自难忘°
    2020-12-05 14:38

    Personally I would do this.

    var styles = {
      margin: '0',
      padding: '5px',
      border: 'solid 0px black'
    }
    
    $('body').css(styles);
    

提交回复
热议问题