我试图重现这一点,但它不起作用: http ://www.templatemonster.com/demo/44543.html
这是我的结果:http ://webs-it.com/callstar/
我想要的是像我发布的示例一样浏览菜单。我对javascript有点陌生,但我没能让它工作。
这是我的代码:
<html>
<head>
<link rel="stylesheet" href="css/style.css" type="text/css" >
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<style>
#block1 {
float:left;
width:1058px;
height:0px;
margin-left:-1058px;
margin-top:100px;
background-color:#fff;
position:relative;
}
#block2 {
width:1058px;
height:0px;
margin-left:-1058px;
margin-top:100px;
background-color:#fff;
position:relative;
}
#logo {
margin:0 auto;
width:502px;
height:259px;
margin-top:144px;
}
</style>
</head>
<body>
<div id="continut">
<div id="header">
<div id="social">
<a href="" onMouseOver="document.facebook.src='images/social/facebook_roll.png'" onMouseOut="document.facebook.src='images/social/facebook.png'"><img src="images/social/facebook.png" name="facebook" alt="."></a> <a href="" onMouseOver="document.ytube.src='images/social/ytube_roll.png'" onMouseOut="document.ytube.src='images/social/ytube.png'"><img src="images/social/ytube.png" name="ytube" alt="."></a> <a href="" onMouseOver="document.en.src='images/social/en_roll.png'" onMouseOut="document.en.src='images/social/en.png'"><img src="images/social/en.png" name="en" alt="."></a> <a href="" onMouseOver="document.cz.src='images/social/cz_roll.png'" onMouseOut="document.cz.src='images/social/cz.png'"><img src="images/social/cz.png" name="cz" alt="."></a>
</div>
</div>
<div id="block1">test test</div>
<div id="block2">test test</div>
<div id="logo" >
<img src="images/logo/logo_homepg.png">
</div>
<div id="meniu">
<a href="#" onMouseOver="document.about.src='images/meniu/about_roll.png'" onMouseOut="document.about.src='images/meniu/about.png'"><img src="images/meniu/about.png" id="go1" name="about" alt="."></a><a href="#" onMouseOver="document.foto.src='images/meniu/photo_roll.png'" onMouseOut="document.foto.src='images/meniu/photo.png'"><img src="images/meniu/photo.png" name="foto" id="go2" alt="."></a><a href="#" onMouseOver="document.video.src='images/meniu/video_roll.png'" onMouseOut="document.video.src='images/meniu/video.png'"><img src="images/meniu/video.png" id="go3" name="video" alt="."></a><a href="#" onMouseOver="document.ref.src='images/meniu/ref_roll.png'" onMouseOut="document.ref.src='images/meniu/ref.png'"><img src="images/meniu/ref.png" name="ref" id="go4" alt="."></a><a href="#" onMouseOver="document.contact.src='images/meniu/contact_roll.png'" onMouseOut="document.contact.src='images/meniu/contact.png'"><img src="images/meniu/contact.png" name="contact" id="go5" alt="."></a>
</div>
</div>
<div id="footer"></div>
<script>
$( "#go1" ).click(function(){
$( "#block1" ).animate({ height: "300px" }, 1 )
.animate( { margin: "100px 0px" }, { queue: false, duration: 700 });
});
$( "#go2" ).click(function(){
$( "#block2" ).animate({ height: "300px" }, 1 )
.animate( { margin: "100px 0px" }, { queue: false, duration: 700 });
$( "#block1" ).animate({ height: "300px" }, 1 )
.animate({ margin: "100px 1558px" }, { queue: false, duration: 700 });
});
</script>
</body>