-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathwheel_demo.html
67 lines (47 loc) · 1.24 KB
/
wheel_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
67
<html>
<script
src="https://code.jquery.com/jquery-3.2.1.min.js"
integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4="
crossorigin="anonymous"></script>
<style>
.roulette_wheel {
background:
/* url('http://www.roulettebonuscode.com/images/roulette-wheel.gif') center center no-repeat; */
url('https://cdn1.iconfinder.com/data/icons/sin-city-memories/128/roulette-512.png') center center no-repeat;
width: 550px;
height: 550px;
animation-duration: 1000ms;
animation-iteration-count: infinite;
animation-timing-function: linear;
-moz-border-radius: 300px;
-webkit-border-radius: 300px;
border-radius: 300px;
}
.spin_wheel {
animation-name: spin;
}
@keyframes spin {
from {
transform:rotate(0deg);
}
to {
transform:rotate(360deg);
}
}
</style>
<script>
$(function() {
$( ".spin_button" ).click(function() {
$('.roulette_wheel').addClass('spin_wheel');
setTimeout(function(){
$('.roulette_wheel').removeClass('spin_wheel');
}, 2000);
return false;
});
});
</script>
<body>
<div class = "roulette_wheel"></div>
<a class = "spin_button" href = "">spin me</a>
</body>
</html>