diff --git a/tarotcard-flip.css b/tarotcard-flip.css index 314f3fe..d811d38 100644 --- a/tarotcard-flip.css +++ b/tarotcard-flip.css @@ -2,8 +2,22 @@ --min-flip-card-height: 80vh; } -.tarot-card--flip-on-hover { +@keyframes flip-card { + to { + transform: rotateY(180deg); + } +} + +.tarot-card--flip-on-hover, +.tarot-card--flip-automatically { min-height: var(--min-flip-card-height); +} + +.tarot-card--flip-automatically .tarot-card__content { + animation: flip-card 800ms 2s forwards; +} + +.tarot-card--flip-on-hover { perspective: 1000px; } @@ -11,7 +25,8 @@ transform: rotateY(180deg); } -.tarot-card--flip-on-hover .tarot-card__content { +.tarot-card--flip-on-hover .tarot-card__content, +.tarot-card--flip-automatically .tarot-card__content { transition: transform 800ms; transform-style: preserve-3d; } diff --git a/test/index.html b/test/index.html index a6a7a86..758ce0a 100644 --- a/test/index.html +++ b/test/index.html @@ -24,7 +24,7 @@ align-items: center; } - #flip-card-back { + .flip-card-back-section { height: 100%; background: white; } @@ -90,7 +90,7 @@
-
+

This is the back side of The Flip Card.

@@ -114,13 +114,36 @@
-
+

This is the back side of The Deal/Flip Card.

+ +
+
+
+
+ The Autoflip Card artwork image. +
+ +
+

The Autoflip Card.

+
+
+ +
+
+

This is the back side of The Autoflip Card.

+
+
+
+