-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path1.按钮特效.html
100 lines (86 loc) · 2.27 KB
/
1.按钮特效.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>css3-btn-demo</title>
<style type="text/css">
* {
margin: 0;
padding: 0;
}
body{
background: rgb(71, 71, 71);
}
.btn{
width: 200px;
height: 50px;
background-color: mediumblue;
text-align: center;
line-height: 50px;
position: relative;
}
.btn a{
text-decoration: none;
color: #fff;
font: bold 20px Arial;
}
.btn-border-top, .btn-border-bottom{
height: 5px;
background-color: #fff;
position: absolute;
width: 0;
}
.btn-border-top{
right: 0;
top: 0;
}
.btn-border-bottom{
left: 0;
bottom: 0;
}
.btn:hover .btn-border-top{
transition: .3s;
width: 100%;
background-color: rgb(205, 0, 154);
}
.btn:hover .btn-border-bottom{
transition: .3s;
width: 100%;
background-color: rgb(205, 0, 154);
}
.btn:hover{
background-color: #fff;
}
.btn:hover a{
color: mediumblue;
}
.btn-group{
width: 700px;
display: flex;
justify-content: space-between;
margin: 100px 0 0 100px;
}
</style>
</head>
<body>
<div class="btn-group">
<div class="btn">
<div class="btn-border-top"></div>
<a href="javascirpt:;">HTML5</a>
<div class="btn-border-bottom"></div>
</div>
<div class="btn">
<div class="btn-border-top"></div>
<a href="javascirpt:;">CSS3</a>
<div class="btn-border-bottom"></div>
</div>
<div class="btn">
<div class="btn-border-top"></div>
<a href="javascirpt:;">Javascript</a>
<div class="btn-border-bottom"></div>
</div>
</div>
<script type="text/javascript">
</script>
</body>
</html>