Spaces:
Running
Running
File size: 909 Bytes
50e8e86 |
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 |
.compare-container {
max-width: 800px;
margin: 40px auto;
position: relative;
cursor: crosshair;
}
.compare-images {
position: relative;
width: 100%;
height: auto;
overflow: hidden;
border-radius: 10px;
aspect-ratio: 16 / 9;
}
.compare-img {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
transition: clip-path 0.1s ease-out;
}
.before-img {
clip-path: inset(0 0 0 50%);
z-index: 1;
}
.after-img {
z-index: 0;
}
.slider-handle {
position: absolute;
top: 0;
left: 50%;
width: 2px;
height: 100%;
background-color: #2ebead;
pointer-events: none;
z-index: 2;
opacity: 0.7;
transition: left 0.1s ease-out;
}
.slider-handle::after {
content: '';
position: absolute;
top: 50%;
left: -11px;
transform: translateY(-50%);
width: 25px;
height: 25px;
background-color: #2ebead;
border-radius: 50%;
}
|