File tree Expand file tree Collapse file tree 2 files changed +63
-0
lines changed Expand file tree Collapse file tree 2 files changed +63
-0
lines changed Original file line number Diff line number Diff line change
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 > Shining Hover</ title >
9
+ </ head >
10
+ < body >
11
+ < button >
12
+ < span > Hover Me </ span >
13
+ </ button >
14
+ </ body >
15
+ </ html >
Original file line number Diff line number Diff line change
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 : # 3b3b3b ;
18
+ border-radius : 5px ;
19
+ min-width : 200px ;
20
+ color : # fff ;
21
+ z-index : 0 ;
22
+ text-transform : uppercase;
23
+ font-weight : 600 ;
24
+ letter-spacing : 2px ;
25
+ transition : all 0.3s ;
26
+ }
27
+
28
+ button ::before {
29
+ content : "" ;
30
+ position : absolute;
31
+ display : block;
32
+ top : 0 ;
33
+ left : -50px ;
34
+ width : 70% ;
35
+ height : 100% ;
36
+ background : linear-gradient (90deg , transparent, # ffffff71, transparent);
37
+ transition : all 1s ;
38
+ z-index : -1 ;
39
+ transform : translateX (-120px ) skew (-20deg );
40
+ }
41
+
42
+ button : hover ::before {
43
+ transform : translateX (300px ) skew (-20deg );
44
+ }
45
+
46
+ button : hover {
47
+ background : # ff006a ;
48
+ }
You can’t perform that action at this time.
0 commit comments