-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.css
155 lines (153 loc) · 2.48 KB
/
main.css
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
:root {
--main-color: rgb(255 255 255 / 80%);
}
* {
box-sizing: border-box;
}
body {
font-family: Arial, Helvetica, sans-serif;
background-color: #333;
}
p {
color: var(--main-color);
font-size: 30px;
width: 26ch; /* You Can Use 28ch*/
margin: 30px auto;
border-right: 2px solid var(--main-color);
overflow: hidden;
white-space: nowrap;
animation: control-width 3s steps(28) 2s both, blink 0.5s infinite;
}
@keyframes control-width {
from {
width: 0;
}
to {
width: 26ch;
}
}
@keyframes blink {
from {
border-right-color: var(--main-color);
}
to {
border-right-color: transparent;
}
}
div {
width: 300px;
margin: 20px auto;
}
input {
padding: 15px;
width: 100%;
border: none;
border-bottom: 2px solid #d7d7d7;
background-color: #fbfbfb;
}
input:focus {
outline: none;
}
.progress {
background-color: #2196f3;
height: 2px;
width: 0;
display: block;
position: relative;
top: -2px;
transition: 0.5s;
}
.count {
display: block;
text-align: right;
font-size: 12px;
padding: 5px;
}
.zero {
font-weight: bold;
color: red;
}
.box{
margin: 40px auto;
width: 300px;
height: 300px;
position: relative;
display: flex;
align-items: center;
justify-content: center;
}
.box:before {
width: 4px;
height: 100%;
left: 50%;
margin-left: -2px;
}
.box:after {
height: 4px;
width: 100%;
top: 50%;
margin-top: -2px;
}
.box:before,
.box:after {
content: "";
background-color: #ddd;
position: absolute;
}
.box:hover button{
box-shadow: 0 0 0 130px #eee;
}
button {
background-color: #eee;
margin: 5px auto;
padding: 10px 20px;
display: block;
font-size: 20px;
border: none;
position: relative;
cursor: pointer;
overflow: hidden;
border-radius: 10px;
z-index: 2;
transition: 0.5s;
}
button:focus {
outline: none;
}
button span {
background-color: #333;
color: #fff;
position: absolute;
left: 50%;
transform: translateX(-50%);
font-size: 18px;
min-width: 240px;
padding: 10px 15px;
top: -60px;
transition: 0.5s;
}
button span:before {
content: "";
position: absolute;
bottom: -20px;
left: 50%;
transform: translateX(-50%);
border-style: solid;
border-width: 10px;
border-color: #333 transparent transparent;
}
button:hover {
overflow: visible;
}
button:hover span {
opacity: 1;
}
[data-position="bottom"] span {
top: auto;
bottom: -60px;
}
[data-position="bottom"] span:before {
bottom: auto;
top: -20px;
border-color: transparent transparent #333;
}