Skip to content

Commit 6e99825

Browse files
slide hover effect button added
1 parent 71a0fa2 commit 6e99825

File tree

3 files changed

+61
-0
lines changed

3 files changed

+61
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Collection of Customized Web UI components. _i.e_ Buttons, Checkboxes, Radio But
1818
| 10 | [Hamburger][hamburger] | [see live][hamburger-live] |
1919
| 11 | [ContextMenu][ctxmenu] | [see live][ctxmenu-live] |
2020
| 12 | [OTP/PIN Filed][otp-f] | [see live][otp-f-live] |
21+
| 13 | [Slide Hover Effect][she] | [see live][she-live] |
2122

2223
## **Preview**
2324

@@ -49,3 +50,5 @@ Collection of Customized Web UI components. _i.e_ Buttons, Checkboxes, Radio But
4950
[ctxmenu-live]: https://codepen.io/hicoders/pen/LYQQNrL
5051
[otp-f]: https://github.com/hicodersofficial/custom-html-css-js-widgets/tree/main/otp-field
5152
[otp-f-live]: https://codepen.io/hicoders/pen/oNEqJGO
53+
[she]: https://github.com/hicodersofficial/custom-html-css-js-widgets/tree/main/slide-button
54+
[she-live]: https://codepen.io/hicoders/pen/MWQzmgY

slide-button/index.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<link rel="stylesheet" href="style.css" />
8+
<title>Slide Hover</title>
9+
</head>
10+
<body>
11+
<button>
12+
<span> Hover Me </span>
13+
</button>
14+
</body>
15+
</html>

slide-button/style.css

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
body {
2+
font-family: "Poppins", sans-serif;
3+
height: 100vh;
4+
display: grid;
5+
place-items: center;
6+
background: #282a36;
7+
}
8+
9+
button {
10+
padding: 18px 30px;
11+
font-size: 16px;
12+
border: none;
13+
position: relative;
14+
cursor: pointer;
15+
box-sizing: border-box;
16+
overflow: hidden;
17+
background: #ff4655;
18+
border-radius: 0;
19+
min-width: 200px;
20+
color: #fff;
21+
z-index: 0;
22+
text-transform: uppercase;
23+
font-weight: 600;
24+
letter-spacing: 2px;
25+
}
26+
27+
button::before {
28+
content: "";
29+
position: absolute;
30+
display: block;
31+
top: 0;
32+
left: -50px;
33+
width: 150%;
34+
height: 100%;
35+
background: #14202d;
36+
transition: all 0.7s ease-in-out;
37+
z-index: -1;
38+
transform: translateX(-300px) skew(-20deg);
39+
}
40+
41+
button:hover::before {
42+
transform: translateX(0px) skew(-20deg);
43+
}

0 commit comments

Comments
 (0)