首页 技术 正文
技术 2022年11月19日
0 收藏 422 点赞 3,607 浏览 3542 个字

html代码

 <!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"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>DIV+CSS布局网站首页实例</title> <link rel="stylesheet" type="text/css" href="css/layout.css" rel="external nofollow"  /> </head> <body>     <div id="container">         <div id="header">             <div id="logo">             </div>             <div id="banner">             </div>             <div id="tool">             </div>             <div class="nav"></div>             <div id="menu">                 <ul>                     <li><a href="#" rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow" >联系我们</a></li>                     <li class="tiao"></li>                     <li><a href="#" rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow" >联系我们</a></li>                     <li class="tiao"></li>                     <li><a href="#" rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow" >联系我们</a></li>                     <li class="tiao"></li>                     <li><a href="#" rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow" >联系我们</a></li>                     <li class="tiao"></li>                     <li><a href="#" rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow" >联系我们</a></li>                     <li class="tiao"></li>                     <li><a href="#" rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow" >联系我们</a></li>                 </ul>             </div>         </div>         <div class="nav"></div>         <div id="main">             <div class="leftbox">                 <div class="left">                     <div class="tit"><h3>热门文章</h3></div>                     <div class="content">                             <ul>                                 <li><a href="#" rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow" >aaaaaaaaaa</a></li>                                 <li><a href="#" rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow" >aaaaaaaaaa</a></li>                                 <li><a href="#" rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow" >aaaaaaaaaa</a></li>                                 <li><a href="#" rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow" >aaaaaaaaaa</a></li>                                 <li><a href="#" rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow" >aaaaaaaaaa</a></li>                             </ul>                     </div>                 </div>                 <div class="right">                 </div>                 <div class="nav"></div>                 <div class="left">                 </div>                 <div class="right">                 </div>             </div>             <div class="rightbox">             </div>             <div class="nav"></div>             <div class="guanggao">                 <div class="tit"><h3>热门文章</h3></div>             </div>             <div class="nav"></div>             <div class="leftbox">                 <div class="left">                     <div class="tit"><h3>热门文章</h3></div>                     <div class="content"></div>                 </div>                 <div class="right">                 </div>                 <div class="nav"></div>                 <div class="left">                 </div>                 <div class="right">                 </div>             </div>             <div class="rightbox">             </div>         </div>         <div class="nav"></div>         <div id="footer">         </div>     </div> </body> </html>

layout.css代码

 /* CSS Document */ body{     margin:0px;     padding:0px;     font:12px "宋体";     text-align:center; } #container{     margin-left:auto;     margin-right:auto;     width:1300px;     text-align:left; } #header{     width:100%;     float:left; } #header #logo{     width:19%;     height:80px;     background:#ff00ff;     float:left; } #header #banner{     width:65%;     height:80px;     margin-left:1%;     background:blue;     float:left; } #header #tool{     width:14%;     height:80px;     background:black;     float:right; } #header #menu{     width:100%;     /*height:28px;*/     background-color:#aaa;     float:inherit;     /*float:left;     float:both;*/ } #main{     width:1300px;     float:left; } #main .leftbox{     float:left;     width:990px; } .leftbox .left{     float:left;     width:400px;     height:195px;     background:yellow; } .tit{     float:left;     width:100%;     height:26px;     background:url(../images/title.png) no-repeat right; } .content{     float:left;     width:398px !important;     width:400px;     height:169px;     border:1px solid #bbb; } .content li{     width:100%;     text-align:left;     padding-left:5px;     line-height:20px;     font-size:16px; } .content li{     background:url(../images/li_icon.gif) no-repeat 0 center;     padding-left:15px; } .content li a{     text-decoration:none;     background:url(../images/dot.gif) repeat-x bottom; } .tit h3{     margin:0px;     padding:0px;     padding-left:5px;     width:350px;     line-height:26px;     font-size:14px;     background:url(../images/title.png) no-repeat left; } .leftbox .right{     float:right;     width:580px;     height:195px;     background:yellow; } #main .rightbox{     float:right;     width:300px;     height:400px;     background:red; } .guanggao{     float:left;     width:100%;     height:100px;     background:green; } ul{     background:yellow;     margin:0px;     padding:0px;     list-style:none; } #menu li{     height:20px;     line-height:20px;     padding-top:5px;     padding-bottom:5px;     width:100px;     float:left;     text-align:center; } #menu a{     color:white; } #header #menu .tiao{     width:1px;     height:10px;     margin-top:5px;     overflow:hidden;     background:#000;     float:left; } #footer{     width:1300px;     height:80px;     background:blue;     float:left; } .nav{     width:100%;     height:10px;     clear:both;     overflow:hidden;      /*IE指定的最小高度为18px,所以我们让超出部分隐藏*/     float:left; } a:hover{     position:relative;     top:1px;     left:1px;     color:red; }
相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,492
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,907
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,740
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,495
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:8,132
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:5,297