Skip to content

Commit 317f936

Browse files
committed
moving an example
1 parent dfd9667 commit 317f936

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

cssom/modify-rule.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)