Animated CSS Background - Moves with Cursor
How do I make an animated css background - moves with cursor?
An Animated CSS Background that moves around the window as the cursor moves. . What is a animated css background - moves with cursor? How do you make a animated css background - moves with cursor? This script and codes were developed by Html5andblog on 24 August 2022, Wednesday.
Animated CSS Background - Moves with Cursor - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Animated CSS Background - Moves with Cursor</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div id="wrap-all">
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Animated CSS Background - Moves with Cursor - Script Codes CSS Codes
html, body {
width: 100%;
height: 100%;
margin: 0;
}
#wrap-all {
width: 100%;
height: 100%;
background: url(//s3-us-west-2.amazonaws.com/s.cdpn.io/130527/texture.jpg) no-repeat center center;
position: fixed;
overflow: auto;
}
Animated CSS Background - Moves with Cursor - Script Codes JS Codes
$('#wrap-all').mousemove(function( event ) {
var containerWidth = $(this).innerWidth(), containerHeight = $(this).innerHeight(), mousePositionX = (event.pageX / containerWidth) * 100, mousePositionY = (event.pageY /containerHeight) * 100;
$(this).css('background-position', mousePositionX + '%' + ' ' + mousePositionY + '%');
});
Developer | Html5andblog |
Username | html5andblog |
Uploaded | August 24, 2022 |
Rating | 3 |
Size | 1,905 Kb |
Views | 40,480 |
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 |
JQuery Right Click Function | 1,933 Kb |
Detect Image Orientation with JavaScript | 1,870 Kb |
Brick by Brick - Full Functionality - Infinite Scroll | 4,497 Kb |
A Pen by html5andblog | 1,538 Kb |
JQuery Live Search Basic Example | 2,050 Kb |
Fix Navigation to Screen on Scroll | 3,673 Kb |
JQuery Live Search on an RSS Feed | 2,312 Kb |
Bubbling Text Effect | 2,827 Kb |
Coin Flip Application | 2,361 Kb |
Type It Out jQuery Plugin - Basic | 2,290 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 |
Cars going | Netoguimaraes | 1,699 Kb |
Pure CSS Read More Arrow | Zephyr | 1,747 Kb |
Layout 11 | Altynai | 1,690 Kb |
Web Spiral - p5.js | TWAIN | 2,183 Kb |
Box Shadow Effects | Retrofuturistic | 2,143 Kb |
Svg animation draw | SzymonDziewonski | 5,545 Kb |
RAQuote | Naderk007 | 4,412 Kb |
P5.js data visualization | Enginarslan | 2,233 Kb |
Monochrome Form | AlienPiglet | 3,096 Kb |
JavaScript constructors | Simboonlong | 2,415 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!