File tree 5 files changed +301
-203
lines changed
5 files changed +301
-203
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"trailingComma": "none",
3
- "tabWidth": 2 ,
3
+ "tabWidth": 4 ,
4
4
"semi": true,
5
5
"singleQuote": true
6
6
}
Original file line number Diff line number Diff line change 21
21
1 . Fork the repo and clone it.
22
22
2 . Add your HTML code in the [ index.html] ( https://github.com/Design-and-Code/css-buttons/blob/main/index.html ) file.
23
23
3 . Add your CSS code in the [ buttons.css] ( https://github.com/Design-and-Code/css-buttons/blob/main/buttons/buttons.css ) file.
24
- 4 . Make sure you do not change any other button's code (for that, use the correct naming conventions - eg. yourname-btn-index or btn-yourname-index).
25
- 5 . When you open the PR, please include a full screenshot.
24
+ 4 . Make sure you do not change any other button's code.
25
+ 5 . For naming css classes use the correct naming conventions - eg. yourname-btn-index or btn-yourname-index.
26
+ 6 . When you open the PR, please include a full screenshot.
26
27
27
28
#### Demo code
28
29
``` html
29
30
<div class =" button-container" >
30
- <!-- add your buttons here, eg.
31
- <button class="button-{number}"><span> Example Button </span></button>
31
+ <!-- add your buttons here, eg.-->
32
+ <button class =" {yourname-button-index}" ><span > Example Button </span ></button >
33
+ <div class =" createdby-section" >
34
+ Created by
35
+ <a href =" {yourgithublink}" >{YOURNAME}</a >
32
36
</div >
33
- -->
34
37
</div >
35
38
```
36
39
Original file line number Diff line number Diff line change 9
9
--bg-btn-card : # 141417 ;
10
10
--forground-main-color : rgb (255 255 255 / 1 );
11
11
--background-main-color : rgb (0 , 0 , 0 );
12
+ --card-border-radius : 30px ;
12
13
}
13
14
14
15
body {
@@ -27,42 +28,46 @@ body::-webkit-scrollbar {
27
28
body ::-webkit-scrollbar-thumb {
28
29
border-radius : 11px ;
29
30
/* -webkit-box-shadow: inset -5px 0px 29px 0 #ec4896; */
30
- background-color : rgb (99 , 99 , 99 );
31
+ background-color : rgb (99 , 99 , 99 );
31
32
}
32
33
33
- main {
34
+ main {
34
35
display : flex;
35
36
align-items : center;
36
37
}
37
38
38
- .navbar {
39
+ .navbar {
39
40
display : flex;
40
41
flex-direction : column;
41
42
align-items : center;
42
43
justify-content : center;
43
44
text-align : center;
44
45
}
45
46
46
- .title {
47
- font-size : 3rem ;
47
+ .title {
48
+ font-size : 3rem ;
48
49
padding-top : 0rem ;
49
50
font-weight : 700 ;
50
51
}
51
- .content-text {
52
- padding : 1rem 0rem 3rem 0rem ;
52
+
53
+ .content-text {
54
+ padding : 1rem 0rem 3rem 0rem ;
53
55
font-size : 1.2rem ;
54
56
}
55
57
56
58
.button-container {
57
- display : flex;
58
- align-items : center;
59
- justify-content : center ;
59
+ display : flex;
60
+ align-items : center;
61
+ justify-content : space-around ;
60
62
width : 18rem ;
61
63
height : 18rem ;
62
64
background-color : var (--bg-btn-card );
63
65
transition : 0.4s ;
64
- border-radius : 30px ;
66
+ border-radius : var (--card-border-radius );
67
+ flex-direction : column;
68
+ position : relative;
65
69
}
70
+
66
71
.button-container : hover {
67
72
transform : translateY (-5px );
68
73
}
@@ -72,17 +77,33 @@ main{
72
77
justify-content : center;
73
78
flex-wrap : wrap;
74
79
gap : 2rem ;
75
-
76
80
}
77
81
78
- footer {
79
- padding-top : 3 rem ;
82
+ . createdby-section {
83
+ width : 100 % ;
80
84
text-align : center;
85
+ padding : 8px 0 ;
86
+ background-color : # 212128 ;
87
+ position : absolute;
88
+ bottom : 0 ;
89
+ border-radius : 0 0 var (--card-border-radius ) var (--card-border-radius );
81
90
}
82
91
83
- footer > a {
84
- color : white ;
85
- font-weight : 700 ;
92
+ . createdby-section a {
93
+ color : rgb ( 129 120 255 / 1 ) ;
94
+ text-decoration : none ;
86
95
}
87
96
97
+ .btn-def-text {
98
+ margin-top : 20px ;
99
+ }
88
100
101
+ footer {
102
+ padding-top : 3rem ;
103
+ text-align : center;
104
+ }
105
+
106
+ footer > a {
107
+ color : white;
108
+ font-weight : 700 ;
109
+ }
Original file line number Diff line number Diff line change @@ -536,8 +536,13 @@ a:focus-visible {
536
536
opacity : 0 ;
537
537
left : 100% ;
538
538
}
539
+ 0% { background-position : 0 0 ; }
540
+ 50% { background-position : 400% 0 ; }
541
+ 100% { background-position : 0 0 ; }
539
542
}
540
543
544
+ /* } */
545
+
541
546
.button-103 : active {
542
547
box-shadow : 0 0 0 0 transparent;
543
548
transition : box-shadow 0.2s ease-in;
@@ -546,11 +551,7 @@ a:focus-visible {
546
551
-ms-transition : box-shadow 0.2s ease-in;
547
552
-o-transition : box-shadow 0.2s ease-in;
548
553
}
549
- 0% { background- position: 0 0; }
550
- 50% { background- position: 400% 0; }
551
- 100% { background- position: 0 0; }
552
- }
553
-
554
+
554
555
555
556
556
557
/* -------------------------------------------------------------button 9----------------------------------------------------- */
You can’t perform that action at this time.
0 commit comments