-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtext underline animation.html
88 lines (88 loc) · 1.91 KB
/
text underline animation.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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Text Underline Animation</title>
<style>
*{
margin:0;
padding:0;
box-sizing:border-box;
}
body{
display:flex;
align-items:center;
justify-content:center;
flex-direction:column;
height:100vh;
background:linear-gradient(45deg, #8B67DB, #B97DCD);
}
.btn{
/*border:1px solid #FFFFFF;*/
border:none;
background:none;
outline:none;
border-radius:5px;
box-shadow:0 0 15px #9E98FF;
margin-bottom:20px;
padding:10px;
width:150px;
height:40px;
font-family:sans-serif;
font-weight:bold;
font-size:20px;
text-transform:uppercase;
position:relative;
color:#FFFFFF;
transition:0.5s;
}
.btn:hover{
transform:scale(1.05);
}
.btn.one:before{
position:absolute;
content:'';
top:80%;
left:20%;
width:0%;
height:2px;
background:#FFFFFF;
transition:0.5s;
}
.btn.one:hover:before{
width:60%;
}
.btn.two:before{
position:absolute;
content:'';
top:80%;
right:20%;
width:0%;
height:2px;
background:#FFFFFF;
transition:0.5s;
}
.btn.two:hover:before{
width:60%;
}
.btn.three:before{
position:absolute;
content:'';
top:80%;
left:50%;
width:0%;
height:2px;
background:#FFFFFF;
transition:0.5s;
}
.btn.three:hover:before{
width:60%;
left:20%;
}
</style>
</head>
<body>
<button class="btn one">Hover Me</button>
<button class="btn two">Hover Me</button>
<button class="btn three">Hover Me</button>
</body>
</html>