擷取游標hover動畫
How do I make an 擷取游標hover動畫?
What is a 擷取游標hover動畫? How do you make a 擷取游標hover動畫? This script and codes were developed by Eric on 07 December 2022, Wednesday.
擷取游標hover動畫 - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>擷取游標hover動畫</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <img class="cat blue" src="http://awiclass.monoame.com/catpic/cat_blue_cat.png" alt=""/><img class="cat yellow" src="http://awiclass.monoame.com/catpic/cat_yellow_cat.png" alt=""/><img class="cat grey" src="http://awiclass.monoame.com/catpic/cat_grey_cat.png" alt=""/><img class="fish" src="http://vignette2.wikia.nocookie.net/ztreasureisle/images/9/93/ColorfulFish_Clown_Fish-icon.png" alt=""/> <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
擷取游標hover動畫 - Script Codes CSS Codes
html, body { width: 100%; height: 100%; background-color: #15161D;
}
.cat { width: 200px; position: absolute; left: 50%; bottom: -50px; transform: translateX(-50%); transition: 0.5s;
}
.blue, .yellow, .grey { position: absolute;
}
.blue { left: 25%;
}
.grey { left: 75%;
}
.fish { width: 80px; cursor: none; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
}
擷取游標hover動畫 - Script Codes JS Codes
$(document).mousemove(function(evt){ var x = evt.pageX; var y = evt.pageY; $(".fish").css("left", x+"px"); $(".fish").css("top", y+"px"); var catplace = $(".blue").offset().left+$(".blue").width()/2; if(Math.abs(x-catplace) < 100){ $(".blue").css("bottom",0) }else{ $(".blue").css("bottom","-50px") } var catplace = $(".yellow").offset().left+$(".yellow").width()/2; if(Math.abs(x-catplace) < 100){ $(".yellow").css("bottom",0) }else{ $(".yellow").css("bottom","-50px") } var catplace = $(".grey").offset().left+$(".grey").width()/2; if(Math.abs(x-catplace) < 100){ $(".grey").css("bottom",0) }else{ $(".grey").css("bottom","-50px") } //console.log(x+", "+y);
});
Developer | Eric |
Username | ericyericy |
Uploaded | December 07, 2022 |
Rating | 3 |
Size | 2,691 Kb |
Views | 6,072 |
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 |
V-on | 3,337 Kb |
Pen,pineapple,apple | 3,333 Kb |
Brand Guideline | 4,033 Kb |
CSS resume | 6,784 Kb |
Vue add del | 2,236 Kb |
Vue | 4,864 Kb |
NameCard | 2,801 Kb |
Transition-duration | 1,935 Kb |
A Pen by Eric | 1,212 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 |
Responsive Pricing Table | Jeremycaris | 2,690 Kb |
CSS Heart Loaders | Nourabusoud | 2,161 Kb |
Gears | Synvox | 3,278 Kb |
Gulpfile | Aimhigherwebdesign-amy | 1,765 Kb |
Simple Flat Menu | Jeplaa | 2,467 Kb |
JQuery exercise | Brian-baum | 3,780 Kb |
GrcJS | Vino6 | 2,047 Kb |
Octopus Bar iPad App Interactions | Davidkpiano | 6,735 Kb |
A Pen by Alex Edwards | Exards | 8,218 Kb |
SnappySnippet Test | Elmsoftware | 8,385 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!