html左侧导航右侧内容,HTML5+CSS:左边导航栏,右边是对应的文本区域

html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

test

#left,#right{

float:left;

color:#FF33CC;

}

#right{

padding:10px;

margin-top:40px;

}

body{

font-size:28px;

line-height:45px;

}

a{text-decoration:none;

color:#FF0000;}  /*去除锚链接的下划线*/

li{

list-style:none;

}

  • document.getElementById('text2').style.display='none'">第一节

     
  • document.getElementById('text1').style.display='none'">第二节

gaga
hehe

效果如下图:

d5957889e563305f16ef53cb49b2337f.png

aef0e84f43243caa004d9e5b1f4533de.png