Last active
October 23, 2020 02:54
-
-
Save Shakil-Shahadat/c6a623ffb240801c7a8013f634468269 to your computer and use it in GitHub Desktop.
Add CSS Styles within JavaScript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let s = document.createElement( 'style' ); | |
s.innerText = ` | |
.box | |
{ | |
display: none; | |
} | |
`; | |
document.head.appendChild( s ); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment