-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.html
75 lines (70 loc) · 2.4 KB
/
example.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<!DOCTYPE html>
<html>
<head>
<style>
details, .example {
padding: 2em;
background: #fafafa;
border: 1px solid #eee;
margin: 1em;
width: 40%;
}
p:before,
summary:before,
details:before {
color: #ccc;
font-style: italic;
}
summary:before { content: 's: '; }
p:before { content: 'p: ';}
details:before { content: 'd: '; position: absolute; top:1.5em; left:2em;}
summary { color: #c66; }
details summary { color: #111;}
details { color: #bada55; }
p { color: #333;}
</style>
<script>
if (! ('open' in document.createElement('details'))) {
var s = document.createElement('script');
s.async = true;
s.src = 'https://rawgit.com/uniqname/Details-Polyfill/master/details.polyfill.min.js';
var scripts = document.getElementsByTagName('script');
var currentScript = scripts[scripts.length - 1];
currentScript.parentElement.insertBefore(s, document.currentScript);
}
</script>
</head>
<body>
<details>
<summary>And the winner is...</summary>
<summary>Drumroll please...</summary>
<summary>The anticipation is killing me...</summary>
Me of course.
</details>
<details>
And the winner is...
<p>Drumroll please...</p>
<summary>The anticipation is killing me...</summary>
Me of course.
</details>
<div>
<summary>And the winner is...</summary>
<details>
<p>Drumroll please...</p>
<p>The anticipation is killing me...</p>
Me of course.
</details>
</div>
<details>
<summary>And the winner is...</summary> Drumroll please... </span>The anticipation is killing me...</span>
Me of course.
</details>
<script>
setTimeout(function () {
var div = document.createElement('div');
div.innerHTML = '<details><summary>Hey, hey. You, you.</summary> I dont like your girlfriend</details>';
document.body.appendChild(div);
}, 4000);
</script>
</body>
</html>