Skip to content

Commit ef3a37f

Browse files
committed
Adding an additional example to the learn section
1 parent b18ba9d commit ef3a37f

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<!doctype html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="utf-8">
6+
<title>Inheritance: simple example</title>
7+
<link rel="stylesheet" href="../styles.css">
8+
<style>
9+
10+
</style>
11+
12+
<style class="editable">
13+
body {
14+
color: blue;
15+
}
16+
17+
span {
18+
color: black;
19+
}
20+
</style>
21+
</head>
22+
23+
<body>
24+
<section class="preview">
25+
<p>As the body has been set to have a color of blue this is inherited through the descendants.</p>
26+
<p>We can change the color by targetting the element with a selector, such as this <span>span</span>.</p>
27+
</section>
28+
29+
<textarea class="playable playable-css" style="height: 120px;">
30+
body {
31+
color: blue;
32+
}
33+
34+
span {
35+
color: black;
36+
}
37+
</textarea>
38+
39+
<textarea class="playable playable-html" style="height: 100px;">
40+
<p>As the body has been set to have a color of blue this is inherited through the descendants.</p>
41+
<p>We can change the color by targetting the element with a selector, such as this <span>span</span>.</p>
42+
</textarea>
43+
44+
<div class="playable-buttons">
45+
<input id="reset" type="button" value="Reset">
46+
</div>
47+
</body>
48+
<script src="../playable.js"></script>
49+
50+
</html>

0 commit comments

Comments
 (0)