Skip to content

Instantly share code, notes, and snippets.

@farithadnan
Created December 22, 2023 01:47
Show Gist options
  • Save farithadnan/0d4042fadfa64088874a09da66c6f5cd to your computer and use it in GitHub Desktop.
Save farithadnan/0d4042fadfa64088874a09da66c6f5cd to your computer and use it in GitHub Desktop.
Rotating and Shrinking Emoji
.rotating-emoji {
display: inline-block;
transition: transform 0.3s ease-in-out;
}
.rotating-emoji:hover {
animation: rotateAndShrink 2s ease-in-out infinite;
transform: scale(0.8);
}
@keyframes rotateAndShrink {
0%, 100% {
transform: rotate(0deg) scale(1);
}
50% {
transform: rotate(180deg) scale(0.5);
}
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Rotating and Shrinking Emoji</title>
</head>
<body>
<span class="rotating-emoji" style="font-size: 2em;">🌟</span>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment