You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
178 lines
4.2 KiB
178 lines
4.2 KiB
6 years ago
|
//======================================
|
||
|
// Card effects
|
||
|
//
|
||
|
//======================================
|
||
|
|
||
|
// Flip cards .card-flip-x or .card-flip-y
|
||
|
//======================================
|
||
|
.card-effect {
|
||
|
position: relative;
|
||
|
margin: 0;
|
||
|
|
||
|
.card-front {
|
||
|
position: relative;
|
||
|
display: block;
|
||
|
}
|
||
|
|
||
|
.card-back {
|
||
|
position: absolute;
|
||
|
height: 100%;
|
||
|
top: 0;
|
||
|
left: 0;
|
||
|
}
|
||
|
|
||
|
&:hover {
|
||
|
|
||
|
}
|
||
|
|
||
|
// Effects
|
||
|
&.card-effect-3d-over {
|
||
|
.card-back {
|
||
|
height: 100%;
|
||
|
width: 100%;
|
||
|
opacity: 0;
|
||
|
-webkit-backface-visibility: hidden;
|
||
|
-moz-backface-visibility: hidden;
|
||
|
backface-visibility: hidden;
|
||
|
-webkit-transition: -webkit-transform 0.3s, opacity 0.3s;
|
||
|
-moz-transition: -moz-transform 0.3s, opacity 0.3s;
|
||
|
transition: transform 0.3s, opacity 0.3s;
|
||
|
}
|
||
|
|
||
|
&:hover .card-back,
|
||
|
&.card-hover .card-back {
|
||
|
opacity: 1;
|
||
|
transform: translate(10px, 10px);
|
||
|
z-index: 5;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
&.card-effect-front-to-back,
|
||
|
&.card-effect-back-reveal {
|
||
|
.card-front {
|
||
|
z-index: 10;
|
||
|
-webkit-backface-visibility: hidden;
|
||
|
-moz-backface-visibility: hidden;
|
||
|
backface-visibility: hidden;
|
||
|
-webkit-transition: -webkit-transform 0.4s, opacity 0.4s;
|
||
|
-moz-transition: -moz-transform 0.4s, opacity 0.4s;
|
||
|
transition: transform 0.4s, opacity 0.4s;
|
||
|
}
|
||
|
.card-back {
|
||
|
height: 100%;
|
||
|
width: 100%;
|
||
|
opacity: 0;
|
||
|
-webkit-transform: scale(0.7);
|
||
|
-moz-transform: scale(0.7);
|
||
|
-ms-transform: scale(0.7);
|
||
|
transform: scale(0.7);
|
||
|
-webkit-backface-visibility: hidden;
|
||
|
-moz-backface-visibility: hidden;
|
||
|
backface-visibility: hidden;
|
||
|
-webkit-transition: -webkit-transform 0.4s, opacity 0.4s;
|
||
|
-moz-transition: -moz-transform 0.4s, opacity 0.4s;
|
||
|
transition: transform 0.4s, opacity 0.4s;
|
||
|
}
|
||
|
|
||
|
&:hover,
|
||
|
&.card-hover {
|
||
|
.card-front {
|
||
|
-webkit-transform: scale(0.1);
|
||
|
-moz-transform: scale(0.1);
|
||
|
-ms-transform: scale(0.1);
|
||
|
transform: scale(0.1);
|
||
|
opacity: 0;
|
||
|
}
|
||
|
.card-back {
|
||
|
-webkit-transform: scale(1);
|
||
|
-moz-transform: scale(1);
|
||
|
-ms-transform: scale(1);
|
||
|
transform: scale(1);
|
||
|
opacity: 1;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
&.card-effect-back-reveal {
|
||
|
.card-back {
|
||
|
-webkit-transform: scale(1);
|
||
|
-moz-transform: scale(1);
|
||
|
-ms-transform: scale(1);
|
||
|
transform: scale(1);
|
||
|
opacity: 1;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
&.card-effect-push-up,
|
||
|
&.card-effect-push-up-half {
|
||
|
overflow: hidden;
|
||
|
|
||
|
.card-front {
|
||
|
-webkit-transition: -webkit-transform 0.4s;
|
||
|
-moz-transition: -moz-transform 0.4s;
|
||
|
transition: transform 0.4s;
|
||
|
}
|
||
|
.card-back {
|
||
|
height: 100%;
|
||
|
width: 100%;
|
||
|
top: auto;
|
||
|
bottom: 0;
|
||
|
opacity: 0;
|
||
|
-webkit-transform: translateY(100%);
|
||
|
-moz-transform: translateY(100%);
|
||
|
-ms-transform: translateY(100%);
|
||
|
transform: translateY(100%);
|
||
|
-webkit-transition: -webkit-transform 0.4s, opacity 0.1s 0.3s;
|
||
|
-moz-transition: -moz-transform 0.4s, opacity 0.1s 0.3s;
|
||
|
transition: transform 0.4s, opacity 0.1s 0.3s;
|
||
|
}
|
||
|
|
||
|
&:hover,
|
||
|
&.card-hover {
|
||
|
.card-front {
|
||
|
-webkit-transform: translateY(-100%);
|
||
|
-moz-transform: translateY(-100%);
|
||
|
-ms-transform: translateY(-100%);
|
||
|
transform: translateY(-100%);
|
||
|
}
|
||
|
.card-back {
|
||
|
opacity: 1;
|
||
|
-webkit-transform: translateY(0px);
|
||
|
-moz-transform: translateY(0px);
|
||
|
-ms-transform: translateY(0px);
|
||
|
transform: translateY(0px);
|
||
|
-webkit-transition: -webkit-transform 0.4s, opacity 0.1s;
|
||
|
-moz-transition: -moz-transform 0.4s, opacity 0.1s;
|
||
|
transition: transform 0.4s, opacity 0.1s;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
&.card-effect-push-up-half {
|
||
|
.card-back {
|
||
|
height: 50%;
|
||
|
}
|
||
|
&:hover,
|
||
|
&.card-hover {
|
||
|
.card-front {
|
||
|
-webkit-transform: translateY(-50%);
|
||
|
-moz-transform: translateY(-50%);
|
||
|
-ms-transform: translateY(-50%);
|
||
|
transform: translateY(-50%);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// Hover show-grow .card-show-grow
|
||
|
//======================================
|
||
|
.card-grow {
|
||
|
@include transition(all ease 0.2s);
|
||
|
|
||
|
&:hover,
|
||
|
&.hover {
|
||
|
-webkit-transform: scale(1.03);
|
||
|
-ms-transform: scale(1.03);
|
||
|
transform: scale(1.03);
|
||
|
}
|
||
|
}
|