Google-like button

Developer
Size
3,145 Kb
Views
18,216

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 Previews

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');
});
Google-like button - Script Codes
Google-like button - Script Codes
Home Page Home
Developer ULRIKA PAN
Username ulrikapan
Uploaded November 14, 2022
Rating 3
Size 3,145 Kb
Views 18,216
Do you need developer help for Google-like button?

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!

ULRIKA PAN (ulrikapan) Script Codes
Create amazing sales emails with AI!

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!