We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dfd9667 commit 317f936Copy full SHA for 317f936
cssom/modify-rule.html
@@ -0,0 +1,17 @@
1
+<html>
2
+ <head>
3
+ <title>Modifying a stylesheet rule with CSSOM</title>
4
+ <style type="text/css">
5
+ body {
6
+ background-color: red;
7
+ }
8
+ </style>
9
+ <script type="text/javascript">
10
+ var stylesheet = document.styleSheets[0];
11
+ stylesheet.cssRules[0].style.backgroundColor="blue";
12
+ </script>
13
+ </head>
14
+ <body>
15
+ <p>The stylesheet declaration for the body's background color is modified via JavaScript.</p>
16
+ </body>
17
+</html>
0 commit comments