Menu Background Image Rollover
How do I make an menu background image rollover?
Use JQuery to change background image on mouse rollover in menu.. What is a menu background image rollover? How do you make a menu background image rollover? This script and codes were developed by Eric Tompkins on 27 August 2022, Saturday.
Menu Background Image Rollover - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Menu Background Image Rollover</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Your Website</title>
</head>
<body>
<div id="bg"> <img id="bg-one" src="http://lorempixel.com/450/281/food/" /> <img id="bg-two" class="hidden" src="http://lorempixel.com/450/281/sports/" /> <img id="bg-three" class="hidden" src="http://lorempixel.com/450/281/fashion/" /> <img id="bg-four" class="hidden" src="http://lorempixel.com/450/281/business/" /> <ul> <a href="#"> <li id="one">Food</li> </a> <a href="#"> <li id="two">Sports</li> </a> <a href="#"> <li id="three">Fashion</li> </a><a href="#"> <li id="four">Business</li> </a> </ul>
</div>
</body>
</html> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Menu Background Image Rollover - Script Codes CSS Codes
@charset "utf-8";
/* CSS Document */
#bg { position: relative; height: 281px; width: 450px; margin: 0 auto; background: #fff;
}
img { position: absolute; left: 0;
}
.hidden { display: none;
}
#bg ul { width: 450px; position: absolute; list-style: none; text-align: center; left: 0; margin: 0; padding: 0;
}
a { text-decoration: none; color: #fff;
}
li { padding: 20px; border-bottom: 1px solid #fff;
}
li:hover { background: #000;
}
Menu Background Image Rollover - Script Codes JS Codes
$(function() { var lastOver = $("#bg-one"); var over; $( "li" ).mouseover(function() { over = "#bg-"+this.id; $(over).fadeIn("slow"); lastOver.fadeOut("slow"); lastOver = $(over); }); });
Developer | Eric Tompkins |
Username | _codemics |
Uploaded | August 27, 2022 |
Rating | 3 |
Size | 2,147 Kb |
Views | 32,384 |
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 |
Menu Background Image Rollover | 2,147 Kb |
3D Rollover Sign-Up Form | 3,727 Kb |
Responsive Email Template | 4,175 Kb |
JQuery FullScreen Overlay | 2,252 Kb |
JQuery - Easy Sticky Nav Bar | 2,551 Kb |
A Pen by Eric Tompkins | 1,243 Kb |
Using Meny.js - Create 3D Nav Effect | 3,191 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 |
Animated rainbow wave on canvas | Icodeforlove | 2,777 Kb |
Blog Concept - Single Post | Marionebl | 9,603 Kb |
Slides-07-1 POSITION | Exhtml | 1,909 Kb |
Rrremark.com Overlay Highlighter | Derickruiz | 4,438 Kb |
Flat buttons for Eliassen.com | Kdooley89 | 1,737 Kb |
Flexbox playground | Enxaneta | 5,418 Kb |
Funny menu | AxeLVaisper | 4,671 Kb |
BenU Maintenance Site | Ksherman | 4,893 Kb |
CSS Chat Bubbles | Boylett | 2,094 Kb |
Bootstrap Carousel Fade Transition | Rowno | 2,484 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!