擷取游標hover動畫

Developer
Size
2,691 Kb
Views
6,072

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動畫 Previews

擷取游標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);
});
擷取游標hover動畫 - Script Codes
擷取游標hover動畫 - Script Codes
Home Page Home
Developer Eric
Username ericyericy
Uploaded December 07, 2022
Rating 3
Size 2,691 Kb
Views 6,072
Do you need developer help for 擷取游標hover動畫?

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!

Eric (ericyericy) Script Codes
Name
V-on
Pen,pineapple,apple
Brand Guideline
CSS resume
Vue add del
Vue
NameCard
Transition-duration
A Pen by Eric
Create amazing art & images 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!