-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.html
66 lines (66 loc) · 1.68 KB
/
demo.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
<!doctype html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>rotating-tile Demo</title>
<script src="../webcomponentsjs/webcomponents.min.js"></script>
<link rel="import" href="rotating-tile.html">
<style>
body {
margin: 32px 32px 0 32px;
}
p {
margin-bottom: 64px;
}
.box {
background-color: rgba(0,0,0,0.54);
height: 50%;
width: 50%;
margin: auto;
}
</style>
</head>
<body unresolved>
<rotating-tile></rotating-tile>
<p>
Default<br>
<button id="play">Play</button>
<button id="pause">Pause</button>
</p>
<rotating-tile duration="4000" color1="rgba(0,0,0,0.54)" color2="purple" color3="rgba(0,0,0,0.54)" color4="purple"></rotating-tile>
<p>
duration="4000"<br>
color1="rgba(0,0,0,0.54)"<br>
color2="purple"<br>
color3="rgba(0,0,0,0.54)"<br>
color4="purple"<br>
</p>
<rotating-tile class="circle"></rotating-tile>
<p>class="circle"</p>
<rotating-tile>
<div class="box" fit></div>
</rotating-tile>
<p>with content inside</p>
<rotating-tile style="border-radius:32px;height:128px;width:128px;opacity:0.54;-webkit-perspective:256px;perspective:256px;"></rotating-tile>
<p>
border-radius: 32px;<br>
height: 128px;<br>
width: 128px;<br>
opacity: 0.54;<br>
-webkit-perspective: 256px;<br>
perspective: 256px;
</p>
<script>
var play = document.querySelector('#play');
var pause = document.querySelector('#pause');
var tile = document.querySelector('rotating-tile');
play.onclick = function() {
tile.play();
};
pause.onclick = function() {
tile.pause();
};
</script>
</body>
</html>