Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save djD-REK/8f6b5b6274af48a1680542b3722a1249 to your computer and use it in GitHub Desktop.
Save djD-REK/8f6b5b6274af48a1680542b3722a1249 to your computer and use it in GitHub Desktop.
// Replace the inline styles:
for (div of document.getElementsByTagName("div")) {
div.style.cssText = "font-size: 3rem"
}
// Clear out all inline styles:
for (div of document.getElementsByTagName("div")) {
div.style.cssText = ""
}
// Clear out all inline styles (not supported in Internet Explorer):
for (div of document.getElementsByTagName("div")) {
div.style.cssText = null
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment