-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSearch.css
More file actions
81 lines (70 loc) · 1.37 KB
/
Search.css
File metadata and controls
81 lines (70 loc) · 1.37 KB
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
#search{
background: #E03A29;
height: 100vh;
box-sizing: border-box;
position: relative;
}
.container{
position: absolute;
left: 50%;
top: 45%;
transform: translate(-50%);
}
.search-box input{
border: none;
background: none;
z-index: 1;
width: 25px;
height: 25px;
transition: all .25s ease-in .25s;
color: transparent;
font-size: 1em;
line-height: 25px;
}
.search-box input:hover{
cursor: pointer;
}
.search-box input:hover:focus{
cursor: text;
}
.search-box input:hover + span{
background: rgba(255, 255, 255, .2);
}
.search-box input:focus{
width: 200px;
padding: 0 10px;
outline: none;
color: black;
background: none;
color: #fff;
}
.search-box input:focus + span{
width: 200px;
}
.search-box input:focus + span::before{
width: 2px;
opacity: 0;
transition: all .25s ease-in;
}
.search-box input + span{
z-index: -1;
position: absolute;
border: 2px solid #fff;
top: 8px;
width: 25px;
height: 25px;
transition: all .25s ease-in .25s;
border-radius: 25px;
left: 0;
}
.search-box input + span::before{
transition: all .25s ease-in .25s;
transform-origin: left top;
content: '';
position: absolute;
width: 10px;
height: 5px;
border-radius: 5px;
background: #fff;
transform: rotate(45deg) translate(31px, -2px);
}