▼メニューにマウスオーバーするとメニューが広がります。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Language" content="ja" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="imagetoolbar" content="no" /> <title>Smooth Animated jQuery Menu | 設置サンプル</title> <link rel="stylesheet" href="/content/lib/global.css" type="text/css" /> <!-- JS --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> <script type="text/javascript" src="/content/lib/jquery/jquery.easing.1.3.js"></script> <script type="text/javascript"> $(function(){ /* マウスオーバー時 */ $("li").mouseover(function(){ $(this).stop().animate({height:'150px'},{queue:false, duration:600, easing: 'easeOutBounce'}) }); /* マウスアウト時 */ $("li").mouseout(function(){ $(this).stop().animate({height:'50px'},{queue:false, duration:600, easing: 'easeOutBounce'}) }); }); </script> <!-- CSS --> <style type="text/css"> ul { margin:0; padding:0; list-style:none; height:100px; } li { margin:0; padding:0; list-style:none; width:100px; height:50px; float:left; color:#191919; text-align:center; overflow:hidden; } li a { color:#fff; text-decoration:none; font-weight:bold; } p { padding:0 5px; } .subtext { padding-top:15px; } /* メニューの色 */ .green { background:#6aa63b; } .yellow { background:#fbc700; } .red { background:#d52100; } .purple { background:#5122b4; } .blue { background:#0292c0; } </style> <link rel="stylesheet" type="text/css" href="/common/css/example.css"></head> <body id='example3' class='example'><div class="ads" style="margin:32px auto;text-align:center;"></div><h1 class='h'><a href='/'>PHP & JavaScript Room</a> :: 設置サンプル</h1> <h3 class='h'>実行結果</h3> <div id="wrap"> <h1><a href='http://buildinternet.com/2009/01/how-to-make-a-smooth-animated-menu-with-jquery/'>Smooth Animated jQuery Menu</a> | 設置サンプル</h1> <p>▼メニューにマウスオーバーするとメニューが広がります。</p> <!-- CODE --> <ul> <li class="green"> <p><a href="#">Home</a></p> <p class="subtext">The front page</p> </li> <li class="yellow"> <p><a href="#">About</a></p> <p class="subtext">More info</p> </li> <li class="red"> <p><a href="#">Contact</a></p> <p class="subtext">Get in touch</p> </li> <li class="blue"> <p><a href="#">Submit</a></p> <p class="subtext">Send us your stuff!</p> </li> <li class="purple"> <p><a href="#">Terms</a></p> <p class="subtext">Legal things</p> </li> </ul> <!-- CODE / --> </div> </body> </html>