-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.css
97 lines (91 loc) · 2.13 KB
/
index.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
body{
margin: 10px !important;
}
footer {
margin-left: 10px !important;
}
header {
width: 100%;
height: 15vw;
border-radius: 7px;
}
h1 {
position: relative;
margin: auto;
}
.main {
padding-top: 10px;
}
p {
margin-top: 30px;
}
.cntr {
display: table;
width: 100%;
height: 100%;
margin: auto;
}
.search-box {
border: solid 2px black;
display: inline-block;
position: relative;
border-radius: 50px;
}
.search-box input[type=text] {
font-size: 14px;
/* font-weight: bold; */
width: 50px;
height: 50px;
padding: 5px 40px 5px 10px;
border: none;
box-sizing: border-box;
border-radius: 40px;
transition: width 800ms cubic-bezier(0.68, -0.55, 0.27, 1.55) 150ms;
}
.search-box input[type=text]:focus {
outline: none;
}
.search-box input[type=text]:focus, .search-box input[type=text]:not(:placeholder-shown) {
width: 275px;
transition: width 800ms cubic-bezier(0.68, -0.55, 0.27, 1.55);
}
.search-box input[type=text]:focus + button[type=reset], .search-box input[type=text]:not(:placeholder-shown) + button[type=reset] {
bottom: 13px;
right: 10px;
transition: bottom 150ms ease-out 800ms, right 150ms ease-out 800ms;
}
.search-box input[type=text]:focus + button[type=reset]:after, .search-box input[type=text]:not(:placeholder-shown) + button[type=reset]:after {
top: 0;
right: 10px;
opacity: 1;
transition: top 150ms ease-out 950ms, right 150ms ease-out 950ms, opacity 150ms ease 950ms;
}
.search-box button[type=reset] {
background-color: transparent;
width: 25px;
height: 25px;
border: 0;
padding: 0;
outline: 0;
display: flex;
justify-content: center;
align-items: center;
position: absolute;
bottom: -13px;
right: -15px;
transition: bottom 150ms ease-out 150ms, right 150ms ease-out 150ms;
}
.search-box button[type=reset]:before, .search-box button[type=reset]:after {
content: "";
height: 25px;
border-left: solid 5px black;
position: absolute;
transform: rotate(-45deg);
}
.search-box button[type=reset]:after {
transform: rotate(45deg);
opacity: 0;
top: -20px;
right: -10px;
transition: top 150ms ease-out, right 150ms ease-out, opacity 150ms ease-out;
}