-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.css
123 lines (119 loc) · 2.52 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
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
*, *:before, *:after {
box-sizing: border-box;
}
body {
background: #fff;
font-family: arial;
padding:50px;
}
h1{
text-align: center;
}
.container{
width:1100px;
margin: 0 auto;
}
.modal-container .modal-btn {
display: block;
color: #fff;
background: #e74c3c;
width: 160px;
height: 50px;
font-size: 22px;
line-height: 50px;
text-align: center;
border-radius: 3px;
cursor: pointer;
box-shadow: 0 5px 5px -5px #333;
transition: background 0.3s ease-in;
}
.modal-container .modal-btn:hover {
background: #c0392b;
}
.modal-container .modal-content,
.modal-container .modal-backdrop {
height: 0;
width: 0;
opacity: 0;
visibility: hidden;
overflow: hidden;
cursor: pointer;
transition: opacity 0.2s ease-in;
}
.modal-content h2{
border-bottom: 2px solid #000;
padding-bottom: 5px;
}
.modal-container .modal-close {
color: #aaa;
background: #fff;
width: 25px;
height: 25px;
padding-top: 3px;
font-size: 26px;
font-weight: bold;
text-align: center;
position: absolute;
right: 5px;
top: 5px;
cursor: pointer;
}
.modal-container .modal-close:hover {
color: #333;
}
.modal-container .modal-content-btn {
position: absolute;
bottom: 20px;
right: 30px;
background: #3498db;
color: #fff;
width: 50px;
height: 32px;
border-radius: 2px;
font-size: 14px;
font-weight: normal;
text-align: center;
cursor: pointer;
padding-top: 9px;
}
.modal-container .modal-content-btn:hover {
color: #fff;
background: #2980b9;
}
.modal-container #modal-toggle {
display: none;
}
.modal-container #modal-toggle:checked ~ .modal-backdrop {
background-color: rgba(0, 0, 0, 0.6);
width: 100vw;
height: 100vh;
position: fixed;
left: 0;
top: 0;
z-index: 9;
visibility: visible;
opacity: 1;
transition: opacity 0.2s ease-in;
}
.modal-container #modal-toggle:checked ~ .modal-content {
background-color: #fff;
max-width: 400px;
width: 400px;
height: 300px;
padding: 10px 30px;
border-radius: 4px;
position: fixed;
left: calc(50% - 200px);
top: 12%;
z-index: 999;
cursor: auto;
visibility: visible;
opacity: 1;
box-shadow: 0 3px 7px rgba(0, 0, 0, 0.6);
}
@media (max-width: 400px) {
.modal-container #modal-toggle.active ~ .modal-content,
.modal-container #modal-toggle:checked ~ .modal-content {
left: 0;
}
}