Skip to content

Instantly share code, notes, and snippets.

@Shakil-Shahadat
Last active October 23, 2020 02:54
Show Gist options
  • Save Shakil-Shahadat/c6a623ffb240801c7a8013f634468269 to your computer and use it in GitHub Desktop.
Save Shakil-Shahadat/c6a623ffb240801c7a8013f634468269 to your computer and use it in GitHub Desktop.
Add CSS Styles within JavaScript
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