Skip to content

Commit 5b52b08

Browse files
committed
add button style of design
1 parent b4786f9 commit 5b52b08

File tree

3 files changed

+55
-6
lines changed

3 files changed

+55
-6
lines changed

Mini ToDoList App Page/css/style.css

Lines changed: 52 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@
77
}
88

99
:root {
10-
--primary-color: ;
11-
--secondary-color: ;
12-
--yellow-color: ;
13-
--white-color: ;
14-
--dark-color: ;
15-
--default-radius: 15px;
10+
--primary-color: #00509d;
11+
--secondary-color: #ffd500;
12+
--white-color: #fdf8e1;
13+
--dark-color: #333533;
14+
--default-radius: 50px;
1615
--primary-font: "Rubik";
1716
}
1817

@@ -23,6 +22,10 @@ html {
2322

2423
body {
2524
font-family: var(--primary-font), sans-serif;
25+
display: flex;
26+
justify-content: center;
27+
align-items: center;
28+
justify-items: center;
2629
}
2730

2831
* {
@@ -48,4 +51,47 @@ p {
4851
button {
4952
background: none;
5053
}
54+
55+
/* PublicItems */
56+
button a.button {
57+
display: block;
58+
padding: 1rem 3.5rem;
59+
margin: 1rem auto;
60+
background-color: var(--dark-color);
61+
color: var(--secondary-color);
62+
border-radius: var(--default-radius);
63+
font-size: 18px;
64+
font-weight: 700;
65+
position: relative;
66+
transition: all 0.2s ease-in;
67+
overflow: hidden;
68+
z-index: 1;
69+
}
70+
71+
a.button:after {
72+
content: " ";
73+
position: absolute;
74+
display: block;
75+
width: 100%;
76+
height: 100%;
77+
top: 100%;
78+
transform: translateX(-50%) scaleY(1) scaleX(1.25);
79+
background-color: var(--secondary-color);
80+
border-radius: 50%;
81+
transition: all 0.5s 0.1s cubic-bezier(0.55, 0, 0.1, 1);
82+
z-index: -1;
83+
}
84+
85+
a.button:hover {
86+
color: var(--dark-color);
87+
}
88+
89+
a.button:hover:after {
90+
top: -40%;
91+
width: 140%;
92+
height: 140%;
93+
border-radius: 0;
94+
transition: all 0.5s 0.1s cubic-bezier(0.55, 0, 0.1, 1);
95+
}
96+
/* End Of PublicItems */
5197
/* End Of Reset CSS */

Mini ToDoList App Page/index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@
4747
<title>Mini ToDoList App Page</title>
4848
</head>
4949
<body>
50+
<button><a href="#" class="button">Test Button</a></button>
51+
<div id="root"></div>
5052
<script src="./js/main.js"></script>
5153
</body>
5254
</html>

Mini ToDoList App Page/js/main.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
document.addEventListener("DOMContentLoaded", function () {});

0 commit comments

Comments
 (0)