forked from csiddu/Frontend-Treasure
-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
121 lines (105 loc) · 2.05 KB
/
style.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
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: Arial;
}
body {
background-image: url(bg.jpg);
background-size: cover;
height: 100vh;
background-position: center;
}
header {
width: 100%;
height: 100px;
display: flex;
justify-content: space-between;
align-items: center;
position: fixed;
z-index: 99;
box-shadow: 0 0 10px #0000;
background: rgba(0, 0, 0, 0.5);
}
#chk1 {
display: none;
}
i {
color: #fff;
cursor: pointer;
}
header .logo {
flex: 1;
color: #fff;
margin-left: 50px;
text-transform: uppercase;
font-size: 15px;
}
header .search-box {
flex: 1;
position: relative;
}
.search-box input {
width: 100%;
height: 30px;
border: none;
outline: none;
background: #f2f2f2;
border-radius: 30px;
color: gray;
font-size: 14px;
text-align: center;
padding-left: 5px;
padding-right: 40px;
}
.search-box button {
cursor: pointer;
width: 30px;
height: 30px;
border-radius: 50%;
border: none;
position: absolute;
top: 0;
right: 5px;
transform: scale(0.9);
background: green;
}
header .menu {
font-size: 2.5em;
display: none;
}
@media (max-width: 1000px) {
.search-box button {
position: absolute;
}
header ul {
position: fixed;
top: 100px;
right: -100%;
background: rgba(0, 0, 0, 0.5);
height: calc(100vh - 100px);
width: 50%;
flex-direction: column;
align-items: center;
transition: right 0.5s linear;
}
header .menu {
display: block;
width: 100px;
text-align: center;
}
#chk1:checked ~ ul {
right: 0;
}
}
@media (max-width: 600px) {
header .logo {
font-size: 10px;
margin-left: 8px;
}
header ul {
width: 100%;
flex-wrap: wrap;
justify-content: center;
}
}