纯CSS3五星评分打分代码特效插件

纯CSS3五星评分打分代码特效插件

一款纯CSS3制作五颗星星悬停滑动评分打分效果代码。

使用方法
在页面引入CSS样式

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
body {
  text-align: center;
  background-color: #34495e;
 font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
 
h1 {
  color: #FFF;
 font-weight: 500;
  padding: 30px;
  text-shadow: 0 3px 3px #2b3c4e;
}
 
input {
  display: none;
}
 
label {
  cursor: pointer;
  font-size: 40px;
  color: yellow;
  display: block;
  width: 50px;
  height: 50px;
  line-height: 60px;
  text-align: center;
  float: left;
  -moz-transition: all 0.2s;
  -o-transition: all 0.2s;
  -webkit-transition: all 0.2s;
  transition: all 0.2s;
  text-shadow: 0 3px 3px #2b3c4e;
}
label:hover {
  font-size: 50px;
  color: #FFF;
 text-shadow: 0 0 5px #b9c9d8;
}
label:before {
  display: inline;
  width: auto;
  height: auto;
  line-height: normal;
  vertical-align: baseline;
  margin-top: 0;
  font-family: FontAwesome;
  font-weight: normal;
  font-style: normal;
  text-decoration: inherit;
  -webkit-font-smoothing: antialiased;
  content: "\f005";
}
 
input:checked + label ~ label:before {
  content: "\f006";
}
 
#wrapper {
 display: inline-block;
}
#wrapper:hover label:before {
 content: "\f005";
}
#wrapper:hover label:hover ~ label:before {
 content: "\f006";
}

文件信息:

    2

    发表评论