-
Notifications
You must be signed in to change notification settings - Fork 0
/
styles.css
107 lines (107 loc) · 2.03 KB
/
styles.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
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
background: #ececec;
font-family: Arial, sans-serif;
display: flex;
justify-content: center;
align-items: center;
}
.image-slider {
height: 350px;
max-height: 350px;
width: 90%;
max-width: 650px;
position: relative;
overflow: hidden;
border-radius: 5px;
box-shadow: 0px 50px 100px rgba(0, 0, 0, 0.4);
background: #000;
transition: transform 300ms ease-in-out;
}
.image-slider:hover {
transform: scale(1.02);
}
.image-slider .images,
.image-slider .images img {
position: absolute;
top: 0;
left: 0;
width: 100%;
}
.image-slider .images img {
object-fit: cover;
opacity: 0;
transform: scale(1.1);
transition: opacity 500ms ease-in-out, transform 500ms ease-in-out;
}
.image-slider .images img.active {
opacity: 1;
transform: scale(1);
}
.image-slider .back-btn,
.image-slider .next-btn {
position: absolute;
top: 50%;
width: 40px;
height: 40px;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
color: #fff;
font-size: 25px;
background: rgba(0, 0, 0, 0.2);
transition: all 300ms ease-in-out;
z-index: 1;
transform: translateY(-50%);
}
.image-slider .back-btn {
left: 0;
}
.image-slider .next-btn {
right: 0;
}
.image-slider .back-btn:hover,
.image-slider .next-btn:hover {
background: rgba(0, 0, 0, 0.5);
}
.image-slider .thumbnails {
position: absolute;
bottom: 5px;
width: 100%;
height: 40px;
display: flex;
justify-content: center;
gap: 5px;
z-index: 1;
}
.image-slider .thumbnails img {
width: 60px;
cursor: pointer;
border: 2px solid transparent;
transition: border 300ms ease;
}
.image-slider .thumbnails img:hover,
.image-slider .thumbnails img.active {
border: 2px solid #fff;
}
@media (max-width: 768px) {
.image-slider {
width: 100%;
padding-top: 64.615%;
height: auto;
}
.image-slider .thumbnails {
height: 30px;
}
.image-slider .thumbnails img {
width: 50px !important;
}
.image-slider:hover {
transform: none;
}
}