Is the only way to change a style to do it per-element in JavaScript?

前端 未结 2 538
逝去的感伤
逝去的感伤 2021-01-13 19:14

I\'ve been looking at a few different things I\'d like to using JavaScript to tweak styles globally. I\'d like to do this by changing the CSS rule that dictates the element\

2条回答
  •  旧巷少年郎
    2021-01-13 19:38

    To modify your existing styles, either find the stylesheet in document.styleSheets or from the the .sheet property of the