/
button_glow.html
102 lines (79 loc) · 1.78 KB
/
button_glow.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
101
102
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Button with glow effect on hover</title>
<style>
body
{
background-color: #7F27FF;
font-family: 'Open Sans', sans-serif;
-webkit-font-smoothing: antialiased;
display: flex;
align-items: center;
justify-content: center;;
height: 100vh;
width: 100vw;
}
.container {
align-items: center;
display: flex;
justify-content: center;
padding: 1em;
text-align: center;
@media (min-width: 600px) {
flex-direction: row;
justify-content: space-between;
}
}
a {
border-bottom: 1px solid;
line-height: 1.4;
padding-top: 0.8em;
padding-bottom: 0.8em;
padding-left: 1.2em;
padding-right: 1.2em;
text-decoration: none;
}
.btn {
color: #fff;
cursor: pointer;
font-size:16px;
font-weight: 400;
line-height: 45px;
margin: 0 0 2em;
max-width: 160px;
position: relative;
text-decoration: none;
text-transform: uppercase;
width: 100%;
@media(min-width: 600px) {
margin: 0 1em 2em;
}
&:hover { text-decoration: none; }
}
.btn-effect {
border: 0 solid;
box-shadow: inset 0 0 20px rgba(255, 255, 255, 0);
outline: 1px solid;
outline-color: rgba(255, 255, 255, .5);
outline-offset: 0px;
text-shadow: none;
transition: all 1250ms cubic-bezier(0.19, 1, 0.22, 1);
}
.btn-effect:hover {
border: 1px solid;
box-shadow: inset 0 0 20px rgba(255, 255, 255, .5), 0 0 20px rgba(255, 255, 255, .2);
outline-color: rgba(255, 255, 255, 0);
outline-offset: 15px;
text-shadow: 1px 1px 2px #427388;
}
</style>
</head>
<body>
<div class="container">
<a href="#" class="btn btn-effect">Hover me</a>
</div>
</body>
</html>