Ringing bell
How do I make an ringing bell?
Just playing around with an animation idea I had for CodeHive's notification icon. Don't think I have the timing or origin quite right. Any suggestions are welcomed :). What is a ringing bell? How do you make a ringing bell? This script and codes were developed by Michael Lee on 20 January 2023, Friday.
Ringing bell - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Ringing bell</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel='stylesheet prefetch' href='https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css'> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ .notification { border: 2px solid #000; font-size: 2.5rem; display: inline-block; text-align: center; line-height: 3.125rem; border-top-left-radius: 100%; border-top-right-radius: 100%; border-bottom-left-radius: 100%; border-bottom-right-radius: 100%; height: 1.25em; width: 1.25em;
}
.notification:hover .notification-icon { -webkit-animation: drop 0.4s; -moz-animation: drop 0.4s; animation: drop 0.4s; -webkit-animation-timing-function: ease-in-out; -moz-animation-timing-function: ease-in-out; animation-timing-function: ease-in-out; -webkit-transform-origin: 50% 6px; -moz-transform-origin: 50% 6px; -ms-transform-origin: 50% 6px; -o-transform-origin: 50% 6px; transform-origin: 50% 6px;
}
.centerer { position: absolute; top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); -moz-transform: translate(-50%, -50%); -ms-transform: translate(-50%, -50%); -o-transform: translate(-50%, -50%); transform: translate(-50%, -50%);
}
.notification-label { font-size: 1.25rem; font-weight: 300; letter-spacing: 5px; position: absolute; left: 50%; -webkit-transform: translateX(-50%); -moz-transform: translateX(-50%); -ms-transform: translateX(-50%); -o-transform: translateX(-50%); transform: translateX(-50%);
}
@-webkit-keyframes drop { 0%, 100% { -webkit-transform: rotate(0); } 20%, 60% { -webkit-transform: rotate(6deg); } 40%, 80% { -webkit-transform: rotate(-6deg); }
}
@-moz-keyframes drop { 0%, 100% { -moz-transform: rotate(0); } 20%, 60% { -moz-transform: rotate(6deg); } 40%, 80% { -moz-transform: rotate(-6deg); }
}
@keyframes drop { 0%, 100% { -webkit-transform: rotate(0); -moz-transform: rotate(0); -ms-transform: rotate(0); -o-transform: rotate(0); transform: rotate(0); } 20%, 60% { -webkit-transform: rotate(6deg); -moz-transform: rotate(6deg); -ms-transform: rotate(6deg); -o-transform: rotate(6deg); transform: rotate(6deg); } 40%, 80% { -webkit-transform: rotate(-6deg); -moz-transform: rotate(-6deg); -ms-transform: rotate(-6deg); -o-transform: rotate(-6deg); transform: rotate(-6deg); }
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <div class="notification centerer"> <div class="notification-icon ion-ios-bell"></div> <div class="notification-label">HOVER</div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
</body>
</html>
Ringing bell - Script Codes CSS Codes
.notification { border: 2px solid #000; font-size: 2.5rem; display: inline-block; text-align: center; line-height: 3.125rem; border-top-left-radius: 100%; border-top-right-radius: 100%; border-bottom-left-radius: 100%; border-bottom-right-radius: 100%; height: 1.25em; width: 1.25em;
}
.notification:hover .notification-icon { -webkit-animation: drop 0.4s; -moz-animation: drop 0.4s; animation: drop 0.4s; -webkit-animation-timing-function: ease-in-out; -moz-animation-timing-function: ease-in-out; animation-timing-function: ease-in-out; -webkit-transform-origin: 50% 6px; -moz-transform-origin: 50% 6px; -ms-transform-origin: 50% 6px; -o-transform-origin: 50% 6px; transform-origin: 50% 6px;
}
.centerer { position: absolute; top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); -moz-transform: translate(-50%, -50%); -ms-transform: translate(-50%, -50%); -o-transform: translate(-50%, -50%); transform: translate(-50%, -50%);
}
.notification-label { font-size: 1.25rem; font-weight: 300; letter-spacing: 5px; position: absolute; left: 50%; -webkit-transform: translateX(-50%); -moz-transform: translateX(-50%); -ms-transform: translateX(-50%); -o-transform: translateX(-50%); transform: translateX(-50%);
}
@-webkit-keyframes drop { 0%, 100% { -webkit-transform: rotate(0); } 20%, 60% { -webkit-transform: rotate(6deg); } 40%, 80% { -webkit-transform: rotate(-6deg); }
}
@-moz-keyframes drop { 0%, 100% { -moz-transform: rotate(0); } 20%, 60% { -moz-transform: rotate(6deg); } 40%, 80% { -moz-transform: rotate(-6deg); }
}
@keyframes drop { 0%, 100% { -webkit-transform: rotate(0); -moz-transform: rotate(0); -ms-transform: rotate(0); -o-transform: rotate(0); transform: rotate(0); } 20%, 60% { -webkit-transform: rotate(6deg); -moz-transform: rotate(6deg); -ms-transform: rotate(6deg); -o-transform: rotate(6deg); transform: rotate(6deg); } 40%, 80% { -webkit-transform: rotate(-6deg); -moz-transform: rotate(-6deg); -ms-transform: rotate(-6deg); -o-transform: rotate(-6deg); transform: rotate(-6deg); }
}
Developer | Michael Lee |
Username | michaellee |
Uploaded | January 20, 2023 |
Rating | 3.5 |
Size | 3,287 Kb |
Views | 4,048 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
SVG Triforce | 2,131 Kb |
Rotating Button | 3,534 Kb |
Axe the Hamburger, Hail the Tab Bar | 3,901 Kb |
My Daily Routine Visualized | 3,544 Kb |
SVG Hearts | 1,513 Kb |
Current time clock icon | 2,794 Kb |
Mountains Illustration | 2,957 Kb |
Stop Using Corner Banners | 2,765 Kb |
Profile background and color changer prototype for CodeHive | 6,454 Kb |
X Mobile Menu | 3,833 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Three js | Paulq | 2,353 Kb |
CSS Piano | Dannystyle | 5,138 Kb |
Fun animations with CSS3 | Minimalmonkey | 2,360 Kb |
404 Error Page | WebSonick | 3,203 Kb |
Rrremark.com Overlay Highlighter | Derickruiz | 4,438 Kb |
Draggables in pure angular | Rlo206 | 5,167 Kb |
CSS Google Now | Jackmoran | 3,196 Kb |
Tile Animation Thing | Frxnz | 4,332 Kb |
Loader | MikitaLisavets | 3,321 Kb |
Canvas Fireworks | Jackrugile | 6,200 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!