746 views
1.cardBox { 2 width: 270px; 3 height: 300px; 4 position: relative; 5 display: grid; 6 place-items: center; 7 overflow: hidden; 8 border-radius: 20px; 9 box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 10px 0px, 10 rgba(0, 0, 0, 0.5) 0px 2px 25px 0px; 11} 12 13.card { 14 position: absolute; 15 width: 95%; 16 height: 95%; 17 background: #000814; 18 border-radius: 20px; 19 z-index: 5; 20 display: flex; 21 justify-content: center; 22 align-items: center; 23 flex-direction: column; 24 text-align: center; 25 color: #ffffff; 26 overflow: hidden; 27 padding: 20px; 28 cursor: pointer; 29 box-shadow: rgba(0, 0, 0, 0.4) 0px 30px 60px -12px inset, 30 rgba(0, 0, 0, 0.5) 0px 18px 36px -18px inset; 31} 32 33.card h3, span { 34 position: absolute; 35 top: 30%; 36 left: 50%; 37 transform: translate(-50%, -50%); 38 font-size: 3rem; 39 font-weight: 800; 40 pointer-events: none; 41 opacity: 0.1; 42} 43 44.text { 45 top: 50%; 46} 47 48.card .content h3 { 49 font-size: 3rem; 50 padding-bottom: 10px; 51} 52 53.card .content p { 54 font-size: 1.6rem; 55 line-height: 25px; 56} 57 58.card .content { 59 transform: translateY(100%); 60 opacity: 0; 61 transition: 0.3s ease-in-out; 62} 63 64.card:hover .content { 65 transform: translateY(0); 66 opacity: 1; 67} 68 69.cardBox::before { 70 content: ""; 71 position: absolute; 72 width: 40%; 73 height: 150%; 74 background: #40E0D0; 75 background: -webkit-linear-gradient(to right, #FF0080, #FF8C00, #40E0D0); 76 background: linear-gradient(to right, #FF0080, #FF8C00, #40E0D0); 77 animation: glowing01 5s linear infinite; 78 transform-origin: center; 79 animation: glowing 5s linear infinite; 80} 81 82@keyframes glowing { 83 0% { 84 transform: rotate(0); 85 } 86 87 100% { 88 transform: rotate(360deg); 89 } 90} 91
JkHuger
JkHuger
MIT License