使用JS建立style标签

var style = document.createElement('style');  style.type = 'text/css';  style.innerHTML="body{ background-color:blue }";  document.getElementsByTagName('head').item(0).appendChild(style); 
相关文章
相关标签/搜索