Google-like button
How do I make an google-like button?
What is a google-like button? How do you make a google-like button? This script and codes were developed by ULRIKA PAN on 14 November 2022, Monday.
Google-like button - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Google-like button</title> <link rel='stylesheet prefetch' href='https://fonts.googleapis.com/css?family=Titillium+Web:400,600,700,900'> <link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="btn-wrapper"> <button id="btn">Click me <div id="circle"></div> </button>
</div> <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Google-like button - Script Codes CSS Codes
@charset "UTF-8";
body, html { padding: 0; margin: 0; background-color: #FEBD77;
}
* { user-select: none; font-family: "Titillium Web", sans-serif, 微軟正黑體;
}
.btn-wrapper { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
}
button { text-transform: uppercase; font-size: 20px; width: 150px; height: 50px; border: 0; border-radius: 5px; outline: 0; color: white; background-color: #2DB0E3; cursor: pointer; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 20px rgba(0, 0, 0, 0.3); overflow: hidden;
}
button:hover { background-color: #2C98E3;
}
button:active { box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}
@media screen and (max-width: 768px) { button { transform: translate(-50%, -50%) scale(1.2); }
}
.click { position: absolute; left: 10px; top: 10px; width: 0px; height: 0px; transform: translate(-50%, -50%); border-radius: 50%; background-color: rgba(255, 255, 255, 0.3); opacity: 0;
}
@keyframes ripple { 0% { opacity: 1; width: 0; height: 0; } 50% { opacity: 1; } 100% { opacity: 0; width: 500px; height: 500px; }
}
Google-like button - Script Codes JS Codes
// $(window).mousemove(function(e){
// $('.test').html(e.clientX + ',' + e.clientY)
// })
$('#btn').click(function(e){ var btnLeft = $('#btn').offset().left; var btnTop = $('#btn').offset().top; var curLeft = e.clientX; var curTop = e.clientY; var addCircle = "<div class='click'> </div>" $('#btn').append(addCircle) $('.click').css('left', curLeft - btnLeft +'px') .css('top', curTop - btnTop +'px') .css('animation', 'ripple .5s linear');
});
Developer | ULRIKA PAN |
Username | ulrikapan |
Uploaded | November 14, 2022 |
Rating | 3 |
Size | 3,145 Kb |
Views | 18,216 |
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 basic | 2,562 Kb |
ABOUT ME | 2,497 Kb |
Flat Button | 3,153 Kb |
Brand Style Guideline | 3,984 Kb |
HTML-form | 2,413 Kb |
Icon1 MG | 2,595 Kb |
Mobile Profile UI | 2,931 Kb |
Wave button | 2,498 Kb |
Contact form | 4,381 Kb |
Weather Box | 6,637 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 |
Count up | Alanshortis | 2,391 Kb |
Contact | GanNichiHa | 2,514 Kb |
CSS Tooltips | Darylldoyle | 2,599 Kb |
Drag and Drop Quiz | Cgspicer | 3,837 Kb |
Animated bar chart | CreativePunch | 3,124 Kb |
Word Wrap Algorithm for Multiline Canvas Text | Peterhry | 2,349 Kb |
Part 19 Bootstrap split button dropdown | Venkatesha | 1,601 Kb |
Delete Hover | Chungman93 | 2,557 Kb |
Angular-HAML | Cwacht | 2,022 Kb |
Cofee and sugar | Tripack | 2,094 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!