Smile
How do I make an smile?
What is a smile? How do you make a smile? This script and codes were developed by Rahul Kumar on 14 October 2022, Friday.
Smile - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Smile</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="wrap"> <div class="bubble">Sonreír</div> <div class="btn"> <div class="eyes"> <div class="left-eye"></div> <div class="right-eye"></div> </div> <div class="smile"></div> <div class="sign">haga clic aquí</div> </div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Smile - Script Codes CSS Codes
body { font-family: 'Roboto Condensed', sans-serif; background: #ddf1f4; font-weight: 700; text-transform: uppercase; color: white;
}
.wrap { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
}
.btn { z-index: 1; cursor: pointer; width: 240px; height: 100px; background: #ce89c8; border-radius: 16px; box-shadow: 0 10px 0 #aa47a2; transition: all 100ms; /* easeInOutExpo */
}
.btn:hover { transform: translate(0, 6px); box-shadow: 0 4px 0 #aa47a2;
}
@keyframes btn { 0% { width: 240px; height: 100px; } 15% { width: 240px; height: 100px; } 40%, 100% { width: 200px; height: 180px; background: #fb9cbb; box-shadow: 0 10px 0 #f73a78; animation-timing-function: cubic-bezier(0.63, -1.515, 0.455, 1.635); }
}
.btn-animation { animation: btn 2s; animation-timing-function: cubic-bezier(0.63, -0.515, 0.455, 1.635); animation-fill-mode: forwards;
}
.sign { width: 100%; margin-left: 0; overflow: hidden; text-align: center; line-height: 94px; font-size: 22px; width: 240px; white-space: nowrap; opacity: 1; transition: all 0.2s;
}
.sgn-anim { width: 60px; margin-left: 100px; text-align: center; line-height: 94px; font-size: 22px; opacity: 0;
}
.smile { position: absolute; width: 20px; height: 20px; background: white; margin: 36px 20px; border-radius: 10px; opacity: 0;
}
@keyframes mouth { 2% { margin: 36px 20px; opacity: 1; border-radius: 10px; } 10% { margin: 36px 40px; border-radius: 10px; } 15% { margin: 36px 40px; width: 166px; border-radius: 10px; } 20% { margin: 36px 50px; width: 120px; opacity: 1; border-radius: 10px 10px 80px 80px; } 40%, 100% { margin: 76px 50px; width: 100px; height: 60px; opacity: 1; border-radius: 10px 10px 80px 80px; }
}
.smile-animation { animation: mouth 2s ease-in-out; animation-fill-mode: forwards;
}
.eyes { position: absolute; height: 20px; transform: translate(36px, 80px); opacity: 0;
}
@keyframes eyes_track { 0% { position: absolute; height: 20px; transform: translate(3px, 80px); opacity: 0; } 24% { opacity: 0; transform: translate(6px, 80px); } 25% { transform: translate(26px, 40px); opacity: 1; animation-timing-function: cubic-bezier(0.63, 0.515, -3.455, 1.635); } 50% { transform: translate(26px, 40px); opacity: 1; } 80%, 100% { transform: translate(26px, 40px); opacity: 1; }
}
.eyes-animation { animation: eyes_track 2.5s; animation-timing-function: cubic-bezier(0.63, -1.515, 0.455, 1.635); animation-fill-mode: forwards;
}
.left-eye { position: absolute; width: 20px; height: 20px; background: white; margin-left: 30px; border-radius: 100%;
}
@keyframes lea { 3% { width: 20px; height: 6px; border-radius: 3px; } 10%, 80% { width: 20px; height: 20px; border-radius: 100%; }
}
.l-eye-animation { animation: lea 3s infinite ease-in-out normal;
}
.right-eye { position: absolute; width: 20px; height: 20px; background: white; margin-left: 100px; border-radius: 100%;
}
.bubble { z-index: 2; position: absolute; top: -100px; right: -100px; width: 0px; height: 0px; border-radius: 50px 50px 50px 0; color: transparent; font-size: 20px; text-align: right; line-height: 100px; background: white; transition: all 0.2s;
}
.bbl { z-index: 2; position: absolute; top: -100px; right: -100px; width: 100px; height: 100px; border-radius: 50px 50px 50px 0; color: #f73a78; font-size: 20px; text-align: center; line-height: 100px; background: white;
}
Smile - Script Codes JS Codes
$( ".btn" ).click(function() { if ($('.btn').hasClass('btn-animation')) { $('.sign').delay(300).removeClass('sgn-anim'); $('.smile').removeClass('smile-animation'); $('.btn').removeClass('btn-animation'); $('.eyes').removeClass('eyes-animation'); $('.right-eye').removeClass('l-eye-animation'); $('.left-eye').removeClass('l-eye-animation'); $('.bubble').removeClass('bbl'); } else { $('.sign').delay(300).addClass('sgn-anim'); $('.smile').addClass('smile-animation'); $('.btn').addClass('btn-animation'); $('.eyes').addClass('eyes-animation'); $('.right-eye').addClass('l-eye-animation'); $('.left-eye').addClass('l-eye-animation'); setTimeout(function(){ $('.bubble').addClass('bbl'); }, 800); }
});
Developer | Rahul Kumar |
Username | rk007 |
Uploaded | October 14, 2022 |
Rating | 3 |
Size | 3,967 Kb |
Views | 20,240 |
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 |
By Rahul | 3,652 Kb |
Hey | 4,289 Kb |
Bitch Roxana | 2,983 Kb |
HeartIt | 2,039 Kb |
Shake it | 2,486 Kb |
Coffee | 2,681 Kb |
- | 2,286 Kb |
A Pen by Rahul Kumar | 42,970 Kb |
You | 2,640 Kb |
For you | 6,495 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 |
Simple star rating using js and data-uri | TheEnd | 5,795 Kb |
Factorial | KeithleySLHS | 1,158 Kb |
HTML5 Breakout | Jaysalvat | 4,873 Kb |
CSS Link Zoom On Click | Bryce | 1,960 Kb |
Waveform function for a siren tone modulation | Clafou | 1,656 Kb |
Add This API | ThatGuySam | 2,848 Kb |
Materializecss input form | Jasonchan | 1,443 Kb |
FontAwesome icons with animation | Nicotinell | 2,083 Kb |
Responsive slide | Thorien | 2,400 Kb |
A Pen by Andrea Verlicchi | Verlok | 2,018 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!