From 9fb61302ccf487922aa117b06159c0e8888de470 Mon Sep 17 00:00:00 2001 From: Hardik Shrestha Date: Thu, 14 Nov 2024 01:20:42 -0500 Subject: [PATCH] Create tiles.css --- css/tiles.css | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 css/tiles.css diff --git a/css/tiles.css b/css/tiles.css new file mode 100644 index 0000000..9d3bb2a --- /dev/null +++ b/css/tiles.css @@ -0,0 +1,50 @@ +/* tiles.css */ +.tile-container { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); + gap: 1.5rem; +} + +.tile { + perspective: 1000px; + cursor: pointer; +} + +.tile-inner { + position: relative; + width: 100%; + height: 150px; + text-align: center; + transition: transform 0.6s; + transform-style: preserve-3d; +} + +.tile:hover .tile-inner { + transform: rotateY(180deg); +} + +.tile-front, .tile-back { + position: absolute; + width: 100%; + height: 100%; + backface-visibility: hidden; + display: flex; + align-items: center; + justify-content: center; + font-size: 1.1rem; + font-weight: bold; + border-radius: 8px; + padding: 1rem; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); +} + +.tile-front { + background-color: #6ea727; + color: white; +} + +.tile-back { + background-color: #3e4d42; + color: #fff; + transform: rotateY(180deg); +}