日期:2014-05-17  浏览次数:20562 次

求助网页设计问题
现需做一个静态网站,页面设计如下:左方为一个导航,比如含有people,news等连接,右方为具体内容,希望做成,一点people右方显示people对应的静态页面,点击news,右方出现news对应的静态页面。       我不想使用frame来做,应为在网页最上方还有很多其他东西,修改起来实在不爽,有没有其他好办法呢??   听说iframe可以完成,该怎么做呢?     请高手指教,最好可以给点示例代码!     多谢

------解决方案--------------------
你要的效果应该是网易导航栏切换的那种效果吧?看看这个了,里面的内容可以稍微编辑一下,不要纯copy了
 CSS 菜单举一反三
http://www.blueidea.com/tech/site/2006/3658.asp

<!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 " lang= "zh-CN ">
<head>
<meta http-equiv= "Content-Type " content= "text/html; charset=gb2312 " />
<title> css菜单演示 </title>


<style type= "text/css ">
<!--

*{margin:0;padding:0;border:0;}
body {
font-family: arial, 宋体, serif;
font-size:12px;
}


#nav {
line-height: 24px; list-style-type: none; background:#666;
}

#nav a {
display: block; width: 80px; text-align:center;
}

#nav a:link {
color:#666; text-decoration:none;
}
#nav a:visited {
color:#666;text-decoration:none;
}
#nav a:hover {
color:#FFF;text-decoration:none;font-weight:bold;
}

#nav li {
float: left; width: 80px; background:#CCC;
}
#nav li a:hover{
background:#999;
}
#nav li ul {
line-height: 27px; list-style-type: none;text-align:left;
left: -999em; width: 980px; position: absolute; float:left;
}
#nav li ul li{
float: left; width: 80px;
background: #F6F6F6;
}


#nav li ul a{
display: block; width: 80px;text-align:center;
}

#nav li ul a:link {
color:#666; text-decoration:none;
}
#nav li ul a:visited {
color:#666;text-decoration:none;
}
#nav li ul a:hover {
color:#F3F3F3;text-decoration:none;font-weight:normal;
background:#C00;
}

#nav li:hover ul {
left:auto;
}
#nav li.sfhover ul {
left:auto;
}
#content {
clear: left;
}


-->
</style>

<script type=text/javascript> <!--//--> <![CDATA[//> <!--
function menuFix() {
var sfEls = document.getElementById( "nav ").getElementsByTagName( "li ");
for (var i=0; i <sfEls.length; i++) {
sfEls[i].onmouseover=function() {
this.className+=(this.className.length> 0? " ": " ") + "sfhover ";
}
sfEls[i].onMouseDown=function() {
this.className+=(this.className.length> 0? " ": " ") + "sfhover ";
}
sfEls[i].onMouseUp=function() {
this.className+=(this.className.length> 0? " ": " ") + "sfhover ";
}
sfEls[i].onmouseout=function() {
this.className=this.className.replace(new RegExp( "( ?|^)sfhover\\b "),

" ");
}
}
}
window.onload=menuFix;

//--> <!]]> </script>

</head>
<body>


<ul id= "nav ">
<li> <a href= "# "> 产品介绍 </a>
<ul>
<li> <a href= "# "> 产品一 </a> </li>
<li> <a href= "# "