Bauble
How do I make an bauble?
Applying and removing an active class with js because i'm too lazy to do it in all css. Add a hash to make it personalized. i.e: codepen.io/abergin/pen/pvEbWE#mom. What is a bauble? How do you make a bauble? This script and codes were developed by Alex Bergin on 13 June 2022, Monday.
Bauble - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Bauble</title> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <link rel='stylesheet prefetch' href='http://fonts.googleapis.com/css?family=Josefin+Slab:300,700'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="bauble"> <div class="body"> <div class="light"></div> </div> <div class="nub"></div>
</div>
<div class="message"> Merry Christmas <h1><!-- put your own name here, or use the hash to set it --></h1>
</div> <script src="js/index.js"></script>
</body>
</html>
Bauble - Script Codes CSS Codes
@-webkit-keyframes dots-move { 0% { left: 0; } 100% { left: -30px; }
}
@keyframes dots-move { 0% { left: 0; } 100% { left: -30px; }
}
html { background-color: #ebffe1; background-image: -webkit-repeating-linear-gradient(45deg, #ebffe1 0, #ebffe1 60px, #e9fcdf 60px, #e9fcdf 120px); background-image: repeating-linear-gradient(45deg, #ebffe1 0, #ebffe1 60px, #e9fcdf 60px, #e9fcdf 120px);
}
html, body { overflow: hidden; position: absolute; padding: 0; margin: 0; min-width: 0; min-height: 0; height: 100%; width: 100%; left: 0; top: 0;
}
html:before, html:after, body:before, body:after { content: ""; position: absolute; width: 30%; height: 15%;
}
html:before, body:before { border-top: 1px dashed #f55e69; top: 15px;
}
html:after, body:after { border-bottom: 1px dashed #f55e69; bottom: 15px;
}
html:before, html:after { border-left: 1px dashed #f55e69; left: 15px;
}
body:before, body:after { border-right: 1px dashed #f55e69; right: 15px;
}
.message { font-family: "Josefin Slab", serif; -moz-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.5s; -o-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.5s; -webkit-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34); -webkit-transition-delay: 0.5s; -webkit-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.5s; transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.5s; -webkit-transform: translate(0, -50%) scale(1); transform: translate(0, -50%) scale(1); width: 100%; position: absolute; padding: 10px 0; font-size: 40px; font-weight: 100; text-shadow: 1px 1px 0 #ebffe1, 2px 2px 0 #d4e6cb, 3px 3px 0 #d4e6cb; text-align: center; letter-spacing: 0.01em; color: #f55e69; top: 50%;
}
.message h1 { font-family: "Josefin Slab", serif; padding: 10px; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; font-size: 55px;
}
.message h1:empty { display: none;
}
.bauble { -moz-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.4s; -o-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.4s; -webkit-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34); -webkit-transition-delay: 0.4s; -webkit-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.4s; transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.4s; -webkit-transform: scale(0, 0); transform: scale(0, 0); position: absolute; left: 50%; top: 50%;
}
.bauble .nub { -moz-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.3s; -o-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.3s; -webkit-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34); -webkit-transition-delay: 0.3s; -webkit-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.3s; transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.3s; -webkit-transform: translate(0, 60px); transform: translate(0, 60px); position: absolute; width: 40px; height: 40px; background-color: #f55e69; position: absolute; top: -90px; left: -20px;
}
.bauble .nub:before, .bauble .nub:after { content: ""; position: absolute;
}
.bauble .nub:before { -moz-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.2s; -o-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.2s; -webkit-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34); -webkit-transition-delay: 0.2s; -webkit-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.2s; transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.2s; -webkit-transform: scale(0, 1); transform: scale(0, 1); border-top-right-radius: 6px; border-top-left-radius: 6px; background-color: #d7e4fa; margin: -8px 0 0 -5px; width: 50px; height: 12px;
}
.bauble .nub:after { background-color: rgba(255, 255, 255, 0.1); -webkit-transition-duration: 0.75s; transition-duration: 0.75s; -moz-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.4s; -o-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.4s; -webkit-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34); -webkit-transition-delay: 0.4s; -webkit-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.4s; transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.4s; width: 10px; height: 52px; top: -12px; right: 0;
}
.bauble .body { overflow: hidden; border-radius: 50%; background-color: #f55e69; z-index: 1; position: absolute; margin: -75px 0 0 -75px; height: 150px; width: 150px;
}
.bauble .body .light { -moz-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.4s; -o-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.4s; -webkit-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34); -webkit-transition-delay: 0.4s; -webkit-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.4s; transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.4s; -webkit-transform: rotate(90deg); transform: rotate(90deg); -webkit-transition-duration: 0.75s; transition-duration: 0.75s; position: absolute; border-radius: 50%; box-shadow: -10px -20px 0 0 rgba(154, 59, 66, 0.127) inset; z-index: 2; bottom: 0; right: 0; left: 0; top: 0;
}
.bauble .body .light:before { content: ""; position: absolute; background-color: rgba(255, 255, 255, 0.1); width: 120px; height: 90px; border-radius: 50%; top: -20px; left: -20px;
}
.bauble .body:before, .bauble .body:after { content: ""; position: absolute;
}
.bauble .body:before { z-index: 1; opacity: 0.75; border-radius: 10px; -moz-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0s; -o-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0s; -webkit-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34); -webkit-transition-delay: 0s; -webkit-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0s; transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0s; -webkit-transition-duration: 0.45s; transition-duration: 0.45s; -webkit-transform: translate(150px, 0); transform: translate(150px, 0); -webkit-backface-visibility: hidden; backface-visibility: hidden; background-color: #fff522; box-shadow: 300px 65px 0 0 #fff522; margin: -35px 0 0 0; height: 10px; width: 500px; left: 0; top: 50%;
}
.bauble .body:after { content: ""; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); -webkit-animation: dots-move 0.3s linear infinite; animation: dots-move 0.3s linear infinite; -moz-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0s; -o-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0s; -webkit-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34); -webkit-transition-delay: 0s; -webkit-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0s; transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0s; background-color: #d7e4fa; border-radius: 50%; box-shadow: 30px 0 0 0 #d7e4fa, 60px 0 0 0 #d7e4fa, 90px 0 0 0 #d7e4fa, 120px 0 0 0 #d7e4fa, 150px 0 0 0 #d7e4fa, 180px 0 0 0 #d7e4fa, 210px 0 0 0 #d7e4fa, 240px 0 0 0 #d7e4fa; top: 50%; left: 0; height: 0; width: 0;
}
.bauble.active { -moz-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0s; -o-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0s; -webkit-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34); -webkit-transition-delay: 0s; -webkit-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0s; transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0s; -webkit-transform: scale(1, 1); transform: scale(1, 1);
}
.bauble.active .nub { -moz-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.1s; -o-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.1s; -webkit-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34); -webkit-transition-delay: 0.1s; -webkit-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.1s; transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.1s; -webkit-transform: translate(0, 0); transform: translate(0, 0);
}
.bauble.active .nub:before { -webkit-transform: scale(1, 1); transform: scale(1, 1); -moz-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.2s; -o-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.2s; -webkit-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34); -webkit-transition-delay: 0.2s; -webkit-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.2s; transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.2s;
}
.bauble.active .nub:after { -webkit-transform: translate(-20px, 0); transform: translate(-20px, 0); -moz-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.25s; -o-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.25s; -webkit-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34); -webkit-transition-delay: 0.25s; -webkit-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.25s; transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.25s; -webkit-transition-duration: 0.75s; transition-duration: 0.75s; width: 20px;
}
.bauble.active .body .light { -webkit-transform: rotate(0deg); transform: rotate(0deg); -moz-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.25s; -o-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.25s; -webkit-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34); -webkit-transition-delay: 0.25s; -webkit-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.25s; transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.25s; -webkit-transition-duration: 0.75s; transition-duration: 0.75s;
}
.bauble.active .body:before { -moz-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.4s; -o-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.4s; -webkit-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34); -webkit-transition-delay: 0.4s; -webkit-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.4s; transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.4s; -webkit-transform: translate(-300px, 0); transform: translate(-300px, 0); -webkit-transition-duration: 0.45s; transition-duration: 0.45s;
}
.bauble.active .body:after { -moz-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.6s; -o-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.6s; -webkit-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34); -webkit-transition-delay: 0.6s; -webkit-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.6s; transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0.6s; height: 15px; width: 15px;
}
.bauble.active + .message { -moz-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0s; -o-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0s; -webkit-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34); -webkit-transition-delay: 0s; -webkit-transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0s; transition: all 0.2s cubic-bezier(0.66, 0, 0.37, 1.34) 0s; -webkit-transform: translate(0, 75px) scale(0.66); transform: translate(0, 75px) scale(0.66);
}
Bauble - Script Codes JS Codes
(function() { var bauble, person; bauble = document.getElementsByClassName("bauble")[0]; person = document.getElementsByTagName("h1")[0]; person.innerHTML = window.location.hash.substring(1); setInterval((function(_this) { return function() { bauble.classList.add("active"); return setTimeout(function() { return bauble.classList.remove("active"); }, 3500); }; })(this), 5500); setTimeout((function(_this) { return function() { return bauble.classList.add("active"); }; })(this), 500);
}).call(this);
Developer | Alex Bergin |
Username | abergin |
Uploaded | June 13, 2022 |
Rating | 4.5 |
Size | 5,287 Kb |
Views | 95,128 |
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 |
3D Accelerometer Ball Pit | 8,397 Kb |
Baymax | 6,250 Kb |
Background animation | 5,314 Kb |
Motion blur loader | 2,505 Kb |
Fancy Text Inputs | 3,934 Kb |
Hsl text shadow generator | 4,200 Kb |
Activate on Scroll | 3,358 Kb |
Sibling Selector Style Change on Hover | 3,087 Kb |
Glitch Camera | 42,627 Kb |
E - Espresso | 4,229 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 |
Animate elements with fixed gradient | Badabam | 4,406 Kb |
Tab Menus | Zephyr | 3,180 Kb |
Css3 slide | Nakome | 3,190 Kb |
CSS 3D Radio buttons | Andreasnylin | 1,650 Kb |
Nested table email layout | Massimo-cassandro | 2,355 Kb |
Draggables in pure angular | Rlo206 | 5,167 Kb |
Pink expansion tunnel | Vez | 1,738 Kb |
Material design - button rainbow circle | Kunukn | 3,652 Kb |
Octopus Bar iPad App Interactions | Davidkpiano | 6,735 Kb |
Static Image to Video Block | Grayghostvisuals | 4,864 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!