Line 9: | Line 9: | ||
height: 15vw; | height: 15vw; | ||
object-fit: cover; | object-fit: cover; | ||
+ | } | ||
+ | |||
+ | .scene { | ||
+ | width: 100%; | ||
+ | height: 15vw; | ||
+ | perspective: 600px; | ||
+ | } | ||
+ | |||
+ | .card { | ||
+ | width: 100%; | ||
+ | height: 100%; | ||
+ | position: relative; | ||
+ | transition: transform 1s; | ||
+ | transform-style: perserve-3d; | ||
+ | } | ||
+ | |||
+ | .card__face { | ||
+ | position: absolute; | ||
+ | height: 100%; | ||
+ | width: 100%; | ||
+ | backface-visibility: hidden; | ||
+ | } | ||
+ | |||
+ | .card__face--front { | ||
+ | } | ||
+ | |||
+ | .card__face--back { | ||
+ | background: blue; | ||
+ | transform: rotateY( 180deg ); | ||
+ | } | ||
+ | |||
+ | .card.is-flipped { | ||
+ | transform: rotateY(180deg); | ||
} | } | ||
Revision as of 03:39, 14 October 2018