代码如下:
menuBarHolder { width: 730px; height:45px; background-color:#000; color:#fff; font-family:Arial; font-size:14px; margin-top:20px;} #menuBarHolder ul{ list-style-type:none; display:block;} #container { margin-top:100px;} #menuBar li{ float:left; padding:15px; height:16px; width:50px; border-right:1px solid #ccc; } #menuBar li a{color:#fff; text-decoration:none; letter-spacing:-1px; font-weight:bold;} .menuHover { background-color:#999;} .firstchild { border-left:1px solid #ccc;} .menuInfo { cursor:hand; background-color:#000; color:#fff; width:74px; font-size:11px;height:100px; padding:3px; display:none; position:absolute; margin-left:-15px; margin-top:-15px; -moz-border-radius-bottomright: 5px; -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; -webkit-border-bottom-right-radius: 5px; -khtml-border-radius-bottomright: 5px; -khtml-border-radius-bottomleft: 5px; border-radius-bottomright: 5px; border-radius-bottomleft: 5px; }
I am some text about the home section
I am some text about the services section
I am some text about the clients section
I am some text about the portfolio section
I am some text about the about section
I am some text about the blog section
I am some text about the follow section
I am some text about the contact section
$(document).ready(function() { $('#menuBar li').click(function() { var url = $(this).find('a').attr('href'); document.location.href = url; }); $('#menuBar li').hover(function() { $(this).find('.menuInfo').slideDown(); }, function() { $(this).find('.menuInfo').slideUp(); }); });
Fluid Navigation CSS & jQuery Tutorial by Addy Osmani HomeI am some text about the home section ServicesI am some text about the services section ClientsI am some text about the clients section PortfolioI am some text about the portfolio section AboutI am some text about the about section BlogI am some text about the blog section FollowI am some text about the follow section ContactI am some text about the contact section
Fluid Navigation CSS & jQuery Tutorial by Addy Osmani