JSDM

HTML

 
1
<body>
2
<div class="wrapper">
3
  <div class="compass"></div>
4
  <div class="needleHolder">
5
    <div class="north"></div>
6
    <div class="south"></div>
7
  </div>
8
9
10
</div>
11
  <h2>Hover over the compass</h2>
12
  
13
</body>
!

CSS

xxxxxxxxxx
111
 
1
body {
2
  background: radial-gradient(#E74C3C,#CF000F);
3
  font-family: "helvetica neue";
4
}
5
6
.wrapper {
7
  width:200px;
8
  height:200px;
9
  /*border:1px solid red;*/
10
  margin: 0 auto;
11
  margin-top: 10%;
12
  position: relative;
13
}
14
15
.compass {
16
  width:200px;
17
  height:200px;
18
  border-radius: 50%;
19
  position: absolute;
20
  background: radial-gradient(#00C1AB,#0A6FD9);
21
  top: 50%;
22
  left: 50%;
23
  transform: translate(-50%, -50%);
24
  border:4px solid #EEEEEE;
25
  border-style: dotted;
26
  box-shadow: 0 0 0 5px #4C77BE, 0 0 0 10px #EEEEEE;
27
}
28
29
30
.needleHolder {
31
  width:200px;
32
  height:200px;
33
  position: absolute;
34
  top: 0;
35
  left: 0;
36
  transition:all 2s;
37
  -webkit-transform:rotate(45deg);
38
}
39
40
.needleHolder:hover {
41
  -webkit-transform:rotate(360deg);
42
43
}
44
45
.north {
46
  width: 0;
47
  height: 0;
48
  border-left: 18px solid transparent;
49
  border-right: 18px solid transparent;
50
  border-bottom: 100px solid #D91E18;
51
  position: absolute;
52
  left:50%;
53
  top:0;
54
  transform: translateX(-50%);
55
}
56
57
.north::before {
58
  content: "";
59
  position: absolute;
60
  width: 0;
61
  height: 0;
62
  border-bottom: 100px solid #962A1B;
63
  border-right: 18px solid transparent;
64
}
65
66
.north::after {
67
  content: "";
68
  position: absolute;
69
  width: 0;
70
  height: 0;
71
  border-bottom: 100px solid #CF000F;
72
  border-right: 6px solid transparent;
73
}
74
75
.south {
76
  width: 0;
77
  height: 0;
78
  border-left: 18px solid transparent;
79
  border-right: 18px solid transparent;
80
  border-top: 100px solid #EEEEEE;
81
  position: absolute;
82
  left:50%;
83
  top:50%;
84
  transform: translateX(-50%);
85
}
86
87
.south::before {
88
  content: "";
89
  position: absolute;
90
  width: 0;
91
  height: 0;
92
  top:-100px;
93
  border-top: 100px solid #95A5A6;
94
  border-right: 18px solid transparent;
95
}
96
97
.south::after {
98
  content: "";
99
  position: absolute;
100
  width: 0;
101
  height: 0;
102
  top:-100px;
103
  border-top: 100px solid #DADFE1;
104
  border-right: 6px solid transparent;
105
}
106
107
h2 {
108
  text-align: center;
109
  color:#EEEEEE;
110
  margin-top: 5%;
111
}
!
? ?
? ?
必须是有效的URL
+ 添加另一个资源

JS

xxxxxxxxxx
1
 
1
!
必须是有效的URL
+ 添加另一个资源
Close

文件管理 点击文件查看URL

图片

  1. 暂无文件

CSS

  1. 暂无文件

JavaScript

  1. 暂无文件

其他

  1. 暂无文件
拖动文件到上面的区域或者:
加载中 ..................