Css files can be dynamically modified using js. It is very useful when performing some interactive operations. The following is an example.
_.Find(document.stylesheets%42.16.css Rules, function (cssRule) {if (cssRule. selectorText & cssRule. selectorText. indexOf (". navbar-fixed-top2 ")>-1) {cssRule. style. position = ""; cssRule. style. top = "0px";} if (cssRule. selectorText & cssRule. selectorText. indexOf ("# pageIndi_content, # page?l=content, # page_appList")>-1) {cssRule. style. padding = "0px";} if (cssRule. selectorText & cssRule. selectorText. indexOf ("# pageappsindex_content")>-1) {cssRule. style. padding = "0px ";}});
The following code cannot be used directly when cssRule is used for loop underscore, otherwise it will not take effect.
CssRule. style = "left: 0; position:''; right: 0; top: 0px; z-index: 1031 ;";
Only
CssRule. style. padding = "0px ";