站长资源网页制作

使用CSS格式化页面布局示例(附图)

整理:jimmy2024/10/7浏览2
简介源代码:复制代码代码如下: New Do</div> <div class="news_infos"><div id="MyContent"><p>源代码:<br><br><u>复制代码</u>代码如下:<br><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <br><html> <br> <head> <br> <title> New Document </title> <br> <meta name="Generator" content="EditPlus"> <br> <meta name="Author" content=""> <br> <meta name="Keywords" content=""> <br> <meta name="Description" content=""> <br> <style type="text/css"> <br> <!-- <br> body{background:#ffcc99;} <br> #header{margin:0px auto;width:1000px;height:100px;background:#FFFFCC;} <br> #menu{margin:5px auto;width:1000px;height:30px;line-height:30px;color:#99FF99; <br> font-weight:bold;font-size:14px;background:#6699FF;} <br> #content{margin:5px auto;width:1000px;height:400px;background-color:#cccccc;} <br> .content_left{float:left;width:200px;height:400px;background:#cc99ff;} <br> .content_center{float:left;width:590px;height:400px;margin-left:5px;background:#cc99ff;} <br> .content_right{float:left;width:200px;height:400px;margin-left:5px;background:#cc99cc} <br> <br> #footer1{margin:5px auto;background-color:#5185E6;color:#FFFFFF; <br> border-top:0px solid #F7F7F6;height:30px;line-height:30px; <br> width:1000px;padding:5px 0;text-align:center;} <br> <br> #footer2{margin:5px auto;background-color:#3333FF;color:#FFFFFF; <br> border-top:0px solid #F7F7F6;height:30px;line-height:30px; <br> width:1000px;padding:5px 0;text-align:center;} <br> <br> a{ <br> text-decoration:none; <br> } <br> <br> --> <br> </style> <br> </head> <br> <br> <body> <br> <div id="header">页面头部</div> <br> <div id="menu"> <br> 页面导航 <br> <tr> <br> <td> <br> <a href="" target="_blank" >首页 <a href="" target="_blank" >日志 <a href="" target="_blank" >相册 <a href="" target="_blank" >留言板 <a href="" target="_blank" >状态 <br> </td> <br> </tr> <br> </div> <br> <div id="content"> <br> <div class="content_left">左侧栏</div> <br> <div class="content_center">中间内容</div> <br> <div class="content_right">右侧栏</div> <br> </div> <br> <div id="footer1">滚动信息栏</div> <br> <div id="footer2">底部</div> <br> </body> <br></html> <br><br>实现效果:<br><a href="javascript:;" onclick="showimg('/UploadFiles/2021-03-30/201311191609454.gif?2013101916106');"><img src="/UploadFiles/2021-03-30/201311191609454.gif?2013101916106" alt="使用CSS格式化页面布局示例(附图)" onmousewheel="return bbimg(this)" onload="javascript:resizepic(this)" border="0"/></a></p></div> </div> </div> <div class="share"> </div> <div class="nextinfo"> <p>上一篇:<a href="http://m.paidiu.com/show/1/72971.html" title="div 的边框显示不同效果示例代码">div 的边框显示不同效果示例代码</a></p> <p>下一篇:<a href="http://m.paidiu.com/show/1/72973.html" title="一款超酷的js+css3实现的3D标签云特效兼容ie7/8/9">一款超酷的js+css3实现的3D标签云特效兼容ie7/8/9</a></p> </div> <div class="otherlink"> <h2>最新资源</h2> <ul> <li><a href="/show/1/615874.html" title="田震.1997-顺其自然(日版)【红星生产社】">田震.1997-顺其自然(日版)【红星生产社】</a></li> <li><a href="/show/1/615873.html" title="小虫.1996-想得太美【滚石】【WAV+CUE】">小虫.1996-想得太美【滚石】【WAV+CUE】</a></li> <li><a href="/show/1/615872.html" title="谢采妘.2016-邓丽君名曲专辑【丰荣】【WA">谢采妘.2016-邓丽君名曲专辑【丰荣】【WA</a></li> <li><a href="/show/1/615871.html" title="张含韵.2007-一人一梦【天中文化】【WAV+">张含韵.2007-一人一梦【天中文化】【WAV+</a></li> <li><a href="/show/1/615870.html" title="蟑螂乐队.1999-帮个忙【福茂】【WAV+CUE】">蟑螂乐队.1999-帮个忙【福茂】【WAV+CUE】</a></li> <li><a href="/show/1/615869.html" title="张宇.2001-替身【EMI百代】【WAV+CUE】">张宇.2001-替身【EMI百代】【WAV+CUE】</a></li> <li><a href="/show/1/615868.html" title="班得瑞原装进口《第六张新世纪专辑:日光海">班得瑞原装进口《第六张新世纪专辑:日光海</a></li> <li><a href="/show/1/615867.html" title="班得瑞原装进口《第七张新世纪专辑:梦花园">班得瑞原装进口《第七张新世纪专辑:梦花园</a></li> <li><a href="/show/1/615866.html" title="班得瑞原装进口《第八张新世纪专辑:琉璃湖">班得瑞原装进口《第八张新世纪专辑:琉璃湖</a></li> <li><a href="/show/1/615865.html" title="魏如萱.2011-在哪里(EP)【添翼创越】【WA">魏如萱.2011-在哪里(EP)【添翼创越】【WA</a></li> </ul> </div> </div> <div class="sidebar"> <div class="cloud"><h2 class="hometitle">标签云</h2><ul><a href="/search.asp?key=1080P高清&m=1">1080P高清<span>(5)</span></a><a href="/search.asp?key=高清电影&m=1">高清电影<span>(5)</span></a><a href="/search.asp?key=百度云盘&m=1">百度云盘<span>(5)</span></a><a href="/search.asp?key=网盘下载&m=1">网盘下载<span>(4)</span></a><a href="/search.asp?key=破解软件&m=1">破解软件<span>(4)</span></a><a href="/search.asp?key=绿色软件&m=1">绿色软件<span>(4)</span></a><a href="/search.asp?key=磁力链接&m=1">磁力链接<span>(3)</span></a><a href="/search.asp?key=强度天梯&m=1">强度天梯<span>(3)</span></a><a href="/search.asp?key=福利资源&m=1">福利资源<span>(2)</span></a><a href="/search.asp?key=王者荣耀&m=1">王者荣耀<span>(2)</span></a><a href="/search.asp?key=黑钻活动&m=1">黑钻活动<span>(2)</span></a><a href="/search.asp?key=WPS会员&m=1">WPS会员<span>(2)</span></a><a href="/search.asp?key=刷图排行&m=1">刷图排行<span>(1)</span></a><a href="/search.asp?key=网盘限速&m=1">网盘限速<span>(1)</span></a><a href="/search.asp?key=鬼灭之刃&m=1">鬼灭之刃<span>(1)</span></a><a href="/search.asp?key=免费韩国漫画&m=1">免费韩国漫画<span>(1)</span></a><a href="/search.asp?key=宫本重做&m=1">宫本重做<span>(1)</span></a><a href="/search.asp?key=免费动漫&m=1">免费动漫<span>(1)</span></a></ul></div> </div> </article> <footer> <p style="font-size: 14px;">友情链接:<a href="http://www.imxmx.com/" title="杰晶网络" target="_blank">杰晶网络</a> <a href="http://www.ddrfans.com/" title="DDR爱好者之家" target="_blank">DDR爱好者之家</a> <a href="http://www.nqxw.com/" title="南强小屋" target="_blank">南强小屋</a> <a href="/" title="黑松山资源网" target="_blank">黑松山资源网</a> <a href="http://www.dyhadc.com/" title="白云城资源网" target="_blank">白云城资源网</a> <a href="/sitemap.xml">SiteMap</a></p> <p>Design by <a href="http://m.paidiu.com">黑松山资源网</a> <a href="/">http://m.paidiu.com</a></p> </footer> <script src="/images/nav.js"></script> <script type="text/javascript"> jQuery.noConflict(); jQuery(function() { var elm = jQuery('#left_flow2'); var startPos = jQuery(elm).offset().top; jQuery.event.add(window, "scroll", function() { var p = jQuery(window).scrollTop(); jQuery(elm).css('position', ((p) > startPos) ? 'fixed' : ''); jQuery(elm).css('top', ((p) > startPos) ? '0' : ''); }); }); </script> </body> </html>