HeartIt
How do I make an heartit?
What is a heartit? How do you make a heartit? This script and codes were developed by Rahul Kumar on 14 October 2022, Friday.
HeartIt - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>HeartIt</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <script src="js/index.js"></script>
</body>
</html>
HeartIt - Script Codes CSS Codes
body { margin: 0; background: #352F59; overflow: hidden;
}
.TwitterHeart { float: left; width: 100px; height: 100px; background-image: url(https://abs.twimg.com/a/1446686284/img/t1/web_heart_animation.png); background-position: 0 0;
}
.TwitterHeart:hover { background-position: -2800px 0;
}
HeartIt - Script Codes JS Codes
for (i = 0; i < 800; i++) document.body.innerHTML += '<div id="' + i + '" class="TwitterHeart"></div>';
//------------------------------------------------------------
window.addEventListener("mouseover", HeartAnimation);
//------------------------------------------------------------
function HeartAnimation(event) { if (event.target.tagName != 'HTML') { var targetHeart = document.getElementById(event.target.id); var heartStateCounter = 1; var timer = setInterval(function() { if (heartStateCounter != 29) targetHeart.style.backgroundPosition = -100 * heartStateCounter++ + 'px 0'; else { clearInterval(timer); } }, 100); }
}
//----------------Both directions: it bugs ---------------------
/*function HeartAnimation(event) { if (event.target.tagName != 'HTML') { var targetHeart = document.getElementById(event.target.id); var heartStateCounter = targetHeart.classList.contains('back') ? 28 : 1; var timer = setInterval(function() { if (heartStateCounter != 29 & heartStateCounter != 0) targetHeart.style.backgroundPosition = targetHeart.classList.contains('back') ? 100 : -100 * heartStateCounter++ + 'px 0'; else { clearInterval(timer); targetHeart.classList.toggle('back'); } }, 30); }
}*/
Developer | Rahul Kumar |
Username | rk007 |
Uploaded | October 14, 2022 |
Rating | 3 |
Size | 2,039 Kb |
Views | 24,288 |
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 |
Shake it | 2,486 Kb |
For you | 6,495 Kb |
You | 2,640 Kb |
Bitch Roxana | 2,983 Kb |
- | 2,286 Kb |
Coffee | 2,681 Kb |
A Pen by Rahul Kumar | 42,970 Kb |
Hmmm... | 4,848 Kb |
By Rahul | 3,652 Kb |
Hey | 4,289 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 |
Use the Twitchtv JSON API | Roksanaop | 3,561 Kb |
Sketchy Box | Mnicpt | 3,033 Kb |
A Pen by aleen42 | Aleen42 | 11,473 Kb |
Border-radius animation | Yukulele | 2,480 Kb |
Hamburger Menu Animation | Salmanraza | 2,580 Kb |
Donut Chart example - MorrisJS | Capelo | 2,385 Kb |
CSS3 Animated buttons | Cguillou | 3,737 Kb |
Under construction | GhostRider | 1,642 Kb |
Basic template | Tomcat | 1,675 Kb |
Pomodoro Clock | Yas46 | 3,328 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!