Created
May 1, 2024 00:13
-
-
Save lewdev/ccdb6c80c4549a608926791f62771b02 to your computer and use it in GitHub Desktop.
π Floating Logo with CSS
This file contains 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
<!doctype html> | |
<head> | |
<title>π Floating Logo with CSS</title> | |
<style> | |
.icon-shadow { | |
width: 50px; | |
margin-top: 1rem; | |
box-shadow: 0px 0px 15px 5px #888; | |
animation: grow 3s ease-in-out infinite; | |
} | |
@keyframes grow { | |
0% { | |
width: 50px; | |
box-shadow: 0px 0px 8px 5px #888; | |
} | |
50% { width: 80px; | |
box-shadow: 0px 0px 15px 5px #888; | |
} | |
100% { width: 50px; | |
box-shadow: 0px 0px 8px 5px #888; | |
} | |
} | |
@-webkit-keyframes float { | |
0% { transform: translatey(0px); } | |
50% { transform: translatey(-20px); } | |
100% { transform: translatey(0px); } | |
} | |
@keyframes float { | |
0% { transform: translatey(0px); } | |
50% { transform: translatey(-20px); } | |
100% { transform: translatey(0px); } | |
} | |
.floating-logo { | |
transform: translatey(0px); | |
animation: float 3s ease-in-out infinite; | |
} | |
.text-center { text-align: center; } | |
.ml-auto { margin-left: auto; } | |
.mr-auto { margin-right: auto; } | |
</style> | |
</head> | |
<body style=margin-top:5rem> | |
<div class="floating-logo text-center" style=font:1.5in'>π</div> | |
<div class="icon-shadow ml-auto mr-auto"></div> | |
</body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment