@import url('https://fonts.googleapis.com/css2?family=Kalnia+Glaze:wght@100..700&family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap'); .how_i_1{ display:flex; margin: 50px; } .how_i_2{ flex-wrap: wrap; } .cards { font-family: "Poppins", system-ui; font-weight: 400; font-style: normal; position: relative; list-style-type: none; padding: 10px; max-width: 34em; margin: 20% auto 0; } p span{ font-family: "Poppins", system-ui; font-weight: 600; font-style: italic; color: #000000; } #cd{ padding: 30px; } #pt{ background-color: #000; } .card { position: absolute; top: 0; left: 0; z-index: 2; background: #ccc; border-radius: 30px; padding: 40px; box-shadow: 0 0 40px #000; transform: translateY(0) rotate(4deg) translateX(25px) scale(1); transform-origin: 0 0; transition: transform 0.6s cubic-bezier(.8,.2,.1,0.8) 0.1s, background 0.4s linear; cursor: pointer; user-select: none; :last-child { margin-bottom: 0; } } .card--next { z-index: 5; transform: translateY(-25px) rotate(4deg) translateX(25px) scale(1); } .card--out { animation: card-out 0.6s cubic-bezier(.8,.2,.1,0.8); transform: translateY(-50px) rotate(8deg) translateX(55px) scale(0.95); z-index: 1; background: #bbb; } @keyframes card-out { 0% { z-index: 20; transform: translateY(0px) rotate(-4deg); } 50% { transform: translateY(-120%) rotate(-5deg) translateX(-40px); } 80% { z-index: 1; } 100% { transform: translateY(-50px) rotate(8deg) translateX(55px) scale(0.95); } } .card--current { cursor: auto; user-select: auto; position: relative; z-index: 10; opacity: 1; background: #EEE; transform: rotate(-1deg) translateX(0%) scale(1); } .a{ text-align: center; color: #FF0000; font-family: "Poppins", system-ui; font-weight: 700; padding: 5PX; } //////////////////////////////////////// // h1 { margin: 0; } // html, body { height: 100%; } // body { padding: 40px; background: #222232; }