-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcustomAddImageButton.html
114 lines (101 loc) · 2.5 KB
/
customAddImageButton.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
103
104
105
106
107
108
109
110
111
112
113
114
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="css.css" />
<title>Document</title>
<style>
/* From uiverse.io by @mrhyddenn */
.icon-btn {
width: 50px;
height: 50px;
border: 1px solid #cdcdcd;
background: white;
border-radius: 25px;
overflow: hidden;
position: relative;
transition: width 0.2s ease-in-out;
font-weight: 500;
font-family: inherit;
}
.add-btn:hover {
width: 120px;
}
.add-btn::before,
.add-btn::after {
transition: width 0.2s ease-in-out, border-radius 0.2s ease-in-out;
content: '';
position: absolute;
height: 4px;
width: 10px;
top: calc(50% - 2px);
background: seagreen;
}
.add-btn::after {
right: 14px;
overflow: hidden;
border-top-right-radius: 2px;
border-bottom-right-radius: 2px;
}
.add-btn::before {
left: 14px;
border-top-left-radius: 2px;
border-bottom-left-radius: 2px;
}
.icon-btn:focus {
outline: none;
}
.btn-txt {
opacity: 0;
transition: opacity 0.2s;
}
.add-btn:hover::before,
.add-btn:hover::after {
width: 4px;
border-radius: 2px;
}
.add-btn:hover .btn-txt {
opacity: 1;
}
.add-icon::after,
.add-icon::before {
transition: all 0.2s ease-in-out;
content: '';
position: absolute;
height: 20px;
width: 2px;
top: calc(50% - 10px);
background: seagreen;
overflow: hidden;
}
.add-icon::before {
left: 22px;
border-top-left-radius: 2px;
border-bottom-left-radius: 2px;
}
.add-icon::after {
right: 22px;
border-top-right-radius: 2px;
border-bottom-right-radius: 2px;
}
.add-btn:hover .add-icon::before {
left: 15px;
height: 4px;
top: calc(50% - 2px);
}
.add-btn:hover .add-icon::after {
right: 15px;
height: 4px;
top: calc(50% - 2px);
}
</style>
</head>
<body>
<button class="icon-btn add-btn">
<div class="add-icon"></div>
<div class="btn-txt">Add Photo</div>
</button>
</body>
</html>