Menu Hover Animation

Developer
Size
2,057 Kb
Views
167,992

How do I make an menu hover animation?

CSS and jQuery Daily Practice. What is a menu hover animation? How do you make a menu hover animation? This script and codes were developed by Satnam Singh on 07 October 2022, Friday.

Menu Hover Animation Previews

Menu Hover Animation - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Menu Hover Animation</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div id="container">	<nav>	<ul id="menu">	<li><a href="#">One<span>One</span></a></li>	<li><a href="#">Two<span>Two</span></a></li>	<li><a href="#">Three<span>Three</span></a></li>	<li><a href="#">Four<span>Four</span></a></li> </ul> </nav>
</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>

Menu Hover Animation - Script Codes CSS Codes

*{	margin:0;	padding:0;
}
body{	background-color:#CCC;
}
nav{	margin:0 auto;	position:relative;	top:20px;
}
ul{	list-style:none;
}
a{	text-decoration:none;	display:block;	width:116px;	padding-top:10px;
}
div#container{	margin:0 auto;	background:#555;
}
a span{	display:block;	color:white;
}
ul#menu{	width:489px;	display:table;	overflow:auto;	margin:0 auto;	border:1px solid red;	overflow:hidden;	position:relative;
}
ul#menu li{	float:left;	text-align:center;	position:relative;	height:44px; font-family:"Lucida Sans Unicode", "Lucida Grande", sans-serif;	font-weight:bold;
}
ul#menu li a{	background:#F60;	color:#FF9;	border:3px solid white;
}
ul#menu li a span{	border-top:6px solid white;	background:#0C6;	padding:10px;	margin-top:9px;
}

Menu Hover Animation - Script Codes JS Codes

$(function(){	$("ul#menu li").hover(function(){	$(this).stop().animate({top:"-45px"},"fast");	},function(){	$(this).stop().animate({top:"0px"},"fast");	});
});
Menu Hover Animation - Script Codes
Menu Hover Animation - Script Codes
Home Page Home
Developer Satnam Singh
Username rssatnam
Uploaded October 07, 2022
Rating 3
Size 2,057 Kb
Views 167,992
Do you need developer help for Menu Hover Animation?

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!

Satnam Singh (rssatnam) Script Codes
Create amazing blog posts 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!