【Web开发】一、页面布局
一、Frame
<frameset id="topFrameSet" rows="69,*" border="0" framespacing="0" frameborder="0"> <frame name="topframe" src="frameTop.html" scrolling="No" noresize="noresize" id="topFrame" /> <frameset id="mainFrameSet" cols="142,1,*" border="0" framespacing="0" frameborder="0"> <frameset id="leftFrameSet" rows="22,*,0" frameborder="no" border="0" framespacing="1"> <frame name="lefttop" noresize="noresize" border="0" src="frameLeftTop.html" scrolling="no" style="border-right: 1px solid #6c9ede;" /> <frame name="leftmenu" src="leftMenuMyTask.html" frameborder="0" scrolling="no" noresize="noresize" border="0" target="right" style="border-right: 1px solid #6c9ede;" id="leftmenu" /> <frame name="leftdn" noresize="noresize" border="0" src="frameleftdown.html" frameborder="0" /> </frameset> <frame name="midline" src="midLine.html" scrolling="No" noresize="noresize" id="midline" /> <frameset id="rightframeset" border="0" framespacing="0" rows="24,*" frameborder="0"> <frame name="rightup" src="frameShowPos.html" noresize="noresize" frameborder="0" scrolling="no" /> <frame name="right" id="right" src="../application/default.html" frameborder="0" scrolling="yes" class="right_scroll" /> </frameset> </frameset> </frameset>
二、DIV
<body> <div id="container"> <div id="header">This is the Header</div> <div id="menu">This is the Menu</div> <div id="mainContent"> <div id="sidebar">This is the sidebar</div> <div id="content">2列左侧固定,右侧自适应宽度+头部+导航</div> </div> </div> </body> body { font-family:Verdana; font-size:14px; margin:0;} #container {margin:0 auto; width:100%;} #header { height:100px; background:#9c6; margin-bottom:5px;} #menu { height:30px; background:#693; margin-bottom:5px;} #mainContent { height:500px; margin-bottom:5px;} #sidebar { float:left; width:200px; height:500px; background:#cf9;} #content { margin-left:205px !important; margin-left:202px; height:500px; background:#ffa;}
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。