-
Notifications
You must be signed in to change notification settings - Fork 5
/
style.css
120 lines (100 loc) · 1.96 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
@import url('https://fonts.googleapis.com/css?family=Roboto');
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: 'Roboto', sans-serif;
background: #333;
color: #fff;
line-height: 1.6;
}
.slider {
position: relative;
overflow: hidden;
height: 100vh;
width: 100vw;
}
.slide {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
transition: opacity 0.4s ease-in-out;
}
.slide.current {
opacity: 1;
}
.slide .content {
position: absolute;
bottom: 70px;
left: -600px;
opacity: 0;
width: 600px;
background-color: rgba(255, 255, 255, 0.8);
color: #333;
padding: 35px;
}
.slide .content h1 {
margin-bottom: 10px;
}
.slide.current .content {
opacity: 1;
transform: translateX(600px);
transition: all 0.7s ease-in-out 0.3s;
}
.buttons button#next {
position: absolute;
top: 50%;
right: 15px;
}
.buttons button#prev {
position: absolute;
top: 50%;
left: 15px;
}
.buttons button {
border: 2px solid #fff;
background-color: transparent;
color: #fff;
cursor: pointer;
padding: 13px 15px;
border-radius: 50%;
outline: none;
}
.buttons button:hover {
background-color: #fff;
color: #333;
}
@media(max-width: 500px) {
.slide .content {
bottom: -300px;
left: 0;
width: 100%;
}
.slide.current .content {
transform: translateY(-300px);
}
}
/* Background images */
.slide:first-child {
background: url('./images/photo1.jpeg') no-repeat center center/cover;
}
.slide:nth-child(2) {
background: url('./images/photo2.jpeg') no-repeat center center/cover;
}
.slide:nth-child(3) {
background: url('./images/photo3.jpeg') no-repeat center center/cover;
}
.slide:nth-child(4) {
background: url('./images/photo4.jpeg') no-repeat center center/cover;
}
.slide:nth-child(5) {
background: url('./images/photo5.jpeg') no-repeat center center/cover;
}
.slide:nth-child(6) {
background: url('./images/photo6.jpeg') no-repeat center center/cover;
}