<html>
<head>
<meta charset="utf-8">
<title>my test</title>
<style>
body{
padding:0margin:0
background:#99E5FF
}
a{
text-decoration:none
}
.header{
margin:30px 100px
height:50px
border:1px solid #646473
background:#001040
}
.p1,.p2,.p3{
font-size:30px
color:#00FFFF
float:left
margin:3px
padding:5px
border-right:1px solid #575748
}
.page1,.page2,.page3{
margin:20px 0
height:500px
border:1px solid #A8A8B7
box-shadow:0 0 3px
background:#CECEBF
}
.page2{
display:none
}
.page3{
display:none
}
</style>
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<script>
$(function(){
$('.p1').click(function(){
$('.page2').hide()
$('.page3').hide()
$('.page1').show()
})
$('.p2').click(function(){
$('.page1').hide()
$('.page3').hide()
$('.page2').show()
})
$('.p3').click(function(){
$('.page1').hide()
$('.page2').hide()
$('.page3').show()
})
})
</script>
</head>
<body>
<div class="header">
<a class="p1" href="#">page1</a>
<a class="p2" href="#">page2</a>
<a class="p3" href="#">page3</a>
</div>
<div class="page1">
<h1>页面1</h1>
</div>
<div class="page2">
<h1>页面2</h1>
</div>
<div class="page3">
<h1>页面3</h1>
</div>
</div>
</body>
</html>