css
Simple CSS addition from JavaScript.
Importing
- Download the css.min.js and host it yourself (preferred)
- Use a public CDN such as jsdelivr
https://cdn.jsdelivr.net/npm/@kushnarang/css@1.0.0/dist/css.min.js
(not preferred)
Usage
The one and only parameter is the CSS you want to add (in the form of a string).
css("body { background: purple }");
// or
css("#header { color: red }");
// or
// whatever CSS you want
Compatablity
Internet Explorer | 9+ |
Chrome | 4+ |
Firefox | 3+ |
Safari | 4+ |