This is a library and demo for dynamic CSS - editting stylesheets from within the browser.
Download the javascript at dcss.js. and include it in your page.
Now you can modify stylesheets in javascript with functions like AddRule to add a new rule and ClearStylesheet to remove all content from a stylesheet. Download main.js to view the example source code for this demo.
For more information, here are some good references:
For a demo, this page lets you create and select stylesheets, select rules and modify or remove them, and add new rules.
| Selector: | |
| Rule: | |
| Selector: | |
| Rule: | |