#e8e8e8
1.card { 2 width: 190px; 3 height: 254px; 4 --border-radius: 15px; 5 --border-width: 4px; 6 appearance: none; 7 position: relative; 8 padding: 1em 2em; 9 border: 0; 10 background: rgb(5, 5, 22); 11 font-size: 18px; 12 font-weight: 500; 13 color: #fff; 14 z-index: 2; 15 border-radius: 15px; 16} 17 18.card::after { 19 --m-i: linear-gradient(#000, #000); 20 --m-o: content-box, padding-box; 21 content: ""; 22 position: absolute; 23 left: 0; 24 top: 0; 25 width: 100%; 26 height: 100%; 27 padding: var(--border-width); 28 border-radius: var(--border-radius); 29 background-image: conic-gradient( 30 #488cfb, 31 #29dbbc, 32 #ddf505, 33 #ff9f0e, 34 #e440bb, 35 #655adc, 36 #488cfb 37 ); 38 -webkit-mask-image: var(--m-i), var(--m-i); 39 mask-image: var(--m-i), var(--m-i); 40 -webkit-mask-origin: var(--m-o); 41 mask-origin: var(--m-o); 42 -webkit-mask-clip: var(--m-o); 43 mask-composite: exclude; 44 -webkit-mask-composite: destination-out; 45 filter: hue-rotate(0); 46 animation: rotate-hue linear 500ms infinite; 47 animation-play-state: paused; 48} 49 50.card:hover::after { 51 animation-play-state: running; 52} 53 54@keyframes rotate-hue { 55 to { 56 filter: hue-rotate(1turn); 57 } 58} 59 60.card, 61.card::after { 62 box-sizing: border-box; 63} 64 65.card:active { 66 --border-width: 5px; 67}
4K views
4K views
Comments
MIT License