134 lines
No EOL
2.1 KiB
CSS
134 lines
No EOL
2.1 KiB
CSS
* {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.slider {
|
|
width: 100%;
|
|
text-align: center;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.slides {
|
|
display: flex;
|
|
|
|
overflow-x: auto;
|
|
overflow-y: hidden;
|
|
scroll-snap-type: x mandatory;
|
|
|
|
scroll-behavior: smooth;
|
|
scroll-snap-stop: inherit;
|
|
-webkit-overflow-scrolling: touch;
|
|
|
|
scroll-snap-points-x: repeat(300px);
|
|
scroll-snap-type: mandatory;
|
|
}
|
|
.slides::-webkit-scrollbar {
|
|
width: 10px;
|
|
height: 10px;
|
|
}
|
|
.slides::-webkit-scrollbar-thumb {
|
|
background: black;
|
|
border-radius: 10px;
|
|
}
|
|
.slides::-webkit-scrollbar-track {
|
|
background: transparent;
|
|
}
|
|
.slides > div {
|
|
scroll-snap-align: start;
|
|
flex-shrink: 0;
|
|
width: 100%;
|
|
height: 30rem;
|
|
margin-right: 50px;
|
|
border-radius: 10px;
|
|
background: #eee;
|
|
transform-origin: center center;
|
|
transform: scale(1);
|
|
transition: transform 0.5s;
|
|
position: relative;
|
|
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
|
|
.slide > img {
|
|
object-fit: cover;
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
.slide-links {
|
|
position: absolute;
|
|
margin: 0;
|
|
top: 35rem;
|
|
left: 0;
|
|
right: 0;
|
|
}
|
|
|
|
.slide-links > a {
|
|
display: inline-flex;
|
|
width: 1rem;
|
|
height: 1rem;
|
|
background: tomato;
|
|
text-decoration: none;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border-radius: 50%;
|
|
margin: 0 0 0 1rem;
|
|
position: relative;
|
|
z-index: 1;
|
|
}
|
|
|
|
.slider-navigation-left {
|
|
position: absolute;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
padding: 1rem;
|
|
height: inherit;
|
|
left: 0;
|
|
top: 0;
|
|
z-index: 2;
|
|
color: tomato;
|
|
font-size: 3.5em;
|
|
}
|
|
|
|
.slider-navigation-left:hover {
|
|
cursor: pointer;
|
|
color: #444;
|
|
}
|
|
|
|
.slider-navigation-right {
|
|
position: absolute;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
padding: 1rem;
|
|
height: inherit;
|
|
top: 0;
|
|
right: 0;
|
|
z-index: 2;
|
|
color: tomato;
|
|
font-size: 3.5em;
|
|
}
|
|
|
|
.slider-navigation-right:active > i {
|
|
top: 1px;
|
|
}
|
|
|
|
.slider-navigation-right:hover {
|
|
cursor: pointer;
|
|
color: #444;
|
|
}
|
|
|
|
.slide-links > a:hover {
|
|
cursor: pointer;
|
|
background: #444;
|
|
}
|
|
|
|
.slide-links > a:active {
|
|
top: 1px;
|
|
} |