Carousel: Card stacking effect on mobile
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
- As well as a grabbing cursor to indicate the click and drag interaction
This commit is contained in:
@@ -22,6 +22,11 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
cursor: grab;
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
cursor: grabbing;
|
||||||
|
}
|
||||||
|
|
||||||
@include breakpoint (xl) {
|
@include breakpoint (xl) {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
@@ -46,7 +51,6 @@
|
|||||||
// Photo
|
// Photo
|
||||||
&__photo {
|
&__photo {
|
||||||
$duration: 1s;
|
$duration: 1s;
|
||||||
|
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -107,15 +111,19 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&:before {
|
&:before {
|
||||||
|
@include breakpoint (sm) {
|
||||||
opacity: 0.4;
|
opacity: 0.4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Previous photo
|
// Previous photo
|
||||||
&--prev {
|
&--prev {
|
||||||
z-index: 8;
|
z-index: 9;
|
||||||
|
transform: translate(-40%, 0) scale(0.85);
|
||||||
|
|
||||||
@include breakpoint (sm) {
|
@include breakpoint (sm) {
|
||||||
|
z-index: 8;
|
||||||
transform: translate(-$distance, -1%) rotate(-$angle) scale($scale);
|
transform: translate(-$distance, -1%) rotate(-$angle) scale($scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -127,9 +135,11 @@
|
|||||||
|
|
||||||
// Next photo
|
// Next photo
|
||||||
&--next {
|
&--next {
|
||||||
z-index: 9;
|
z-index: 8;
|
||||||
|
transform: translate(40%, 0) scale(0.85);
|
||||||
|
|
||||||
@include breakpoint (sm) {
|
@include breakpoint (sm) {
|
||||||
|
z-index: 9;
|
||||||
transform: translate($distance, -1%) rotate($angle) scale($scale);
|
transform: translate($distance, -1%) rotate($angle) scale($scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user