Yet another glowing card
Created
February 11, 2022 05:41
-
-
Save AlexGG23/7f02bbac6114de6ae07abffe3455b2fb to your computer and use it in GitHub Desktop.
Magic Card
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="card"> | |
SpiderVerse Confirmado !!! | |
</div> | |
<a href="https://github.com/AlexGG23" target="_blank">AlexGG23</a> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
p{ | |
color:white; | |
} | |
@property --rotate { | |
syntax: "<angle>"; | |
initial-value: 132deg; | |
inherits: false; | |
} | |
:root { | |
--card-height: 65vh; | |
--card-width: calc(var(--card-height) / 1.5); | |
} | |
body { | |
min-height: 100vh; | |
background: white; | |
display: flex; | |
align-items: center; | |
flex-direction: column; | |
padding-top: 2rem; | |
padding-bottom: 2rem; | |
box-sizing: border-box; | |
} | |
.card { | |
background-image: url(https://pbs.twimg.com/profile_images/1222646977332174849/xWcD6t_Q_400x400.jpg); | |
background-size: 100% 100%; | |
width: 250px; | |
height: 380px; | |
padding: 3px; | |
position: relative; | |
border-radius: 6px; | |
justify-content: center; | |
align-items: center; | |
text-align: center; | |
display: flex; | |
font-size: 1.5em; | |
color: rgb(88 199 250 / 0%); | |
cursor: pointer; | |
font-family: ARIAL; | |
} | |
.card:hover { | |
color: white; | |
transition: color 1s; | |
background-image: url(""); | |
} | |
.card:hover:before, .card:hover:after { | |
animation: none; | |
opacity: 1; | |
} | |
.card::before { | |
content: ""; | |
width: 104%; | |
height: 102%; | |
border-radius: 8px; | |
background-image: linear-gradient( | |
var(--rotate) | |
, #5ddcff, #3c67e3 43%, #F80A0A); | |
position: absolute; | |
z-index: -1; | |
top: -1%; | |
left: -2%; | |
animation: spin 2.5s linear infinite; | |
} | |
.card::after { | |
position: absolute; | |
content: ""; | |
top: calc(var(--card-height) / 6); | |
left: 0; | |
right: 0; | |
z-index: -1; | |
height: 100%; | |
width: 100%; | |
margin: 0 auto; | |
transform: scale(0.8); | |
filter: blur(calc(var(--card-height) / 6)); | |
background-image: linear-gradient( | |
var(--rotate) | |
, #DB2626, #AC1F1F 73%, #F80A0A); | |
opacity: 1; | |
transition: opacity .5s; | |
animation: spin 2.5s linear infinite; | |
} | |
@keyframes spin { | |
0% { | |
--rotate: 0deg; | |
} | |
100% { | |
--rotate: 360deg; | |
} | |
} | |
a { | |
color: #212534; | |
text-decoration: none; | |
font-family: sans-serif; | |
font-weight: bold; | |
margin-top: 2rem; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment