Manipulating Class CSS with Greasemonkey/Tampermonkey
You seek to modify the background image of a page element with the "banner_url" class. The desired CSS property is provided.
Using CSS Cascade with Greasemonkey:
Inject the CSS rules into the page using GM_addStyle(). We recommend the following script:
// ==UserScript== // @name _Override banner_url styles // @include http://YOUR_SERVER.COM/YOUR_PATH/* // @grant GM_addStyle // @run-at document-start // ==/UserScript== GM_addStyle ( ` .banner_url { background: url('http://www.pxleyes.com/images/contests/kiwis/fullsize/sourceimage.jpg') no-repeat center center fixed !important; -webkit-background-size: cover !important; -moz-background-size: cover !important; -o-background-size: cover !important; background-size: cover !important; } ` );
Note:
Alternatives:
The above is the detailed content of How to Override CSS Styles for the \'banner_url\' Class with Greasemonkey/Tampermonkey?. For more information, please follow other related articles on the PHP Chinese website!