博主信息
博文 35
粉丝 0
评论 0
访问量 32862
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
双飞翼布局
锋芒天下的博客
原创
864人浏览过

<!DOCTYPE html>
<html lang="en">
<head>
   <meta charset="UTF-8">
   <title>双飞翼布局</title>

   <style>
       *{
           margin: 0;
           padding: 0;
       }
       /*头部开始*/
       .header{
           height: 60px;
           background: #eeeeee;
       }
       .header .content{
           width: 1000px;
           height: 60px;
           margin: 0 auto;
           background: #666;
       }
       .header .content .item{
           list-style: none;
       }
       .header .content .item a{
           width: 80px;
           color: #fff;
           float: left;
           text-decoration: none;
           text-align: center;
           line-height: 60px;
           padding: 0 20px;
       }
       .header .content .item a:hover{
           background: #999999;
           font-size: 1.2em;
       }
       /*头部结束*/
       /*主体开始*/
       .container{
           width: 1000px;
           height: 800px;
           background: #eeeeee;
           margin: 10px auto;
       }

       .container .wrop{
           width: inherit;
           height: 800px;
           float: left;
       }
       .container .wrop .min{
           height: 800px;
           margin: 0 210px;
           background: #999999;
       }
       .container .left{
           width: 200px;
           height: 800px;
           background: #666666;
           float: left;
           margin-left: -100%;
       }
       .container .right{
           width: 200px;
           height: 800px;
           background: #666666;
           float: left;
           margin-left: -200px;
       }
       /*主体结束*/
       /*底部开始*/
       .footer{
           height: 200px;
           background: #eeeeee;

       }
       /*底部结束*/

   </style>

</head>
<body>
<!--    默写出双飞翼布局的基本思路与实现代码, 要求配图片说明-->
<!--        基本思路:分头部-主体-底部 3个大区域;-->
<!--                主体分为:左部left - 主体min -右部right,将min外部套一个div元素;全部左浮动float-->
<!--                左部margin-left设置100%;右部margin-left设置成右部元素的宽度;-->
<!--                然后min用margin的左右边距挤出来;-->

   <div class="header">
       <div class="content">
           <ul class="nav">
               <li class="item"><a href="">导航01</a></li>
               <li class="item"><a href="">导航02</a></li>
               <li class="item"><a href="">导航03</a></li>
               <li class="item"><a href="">导航04</a></li>
               <li class="item"><a href="">导航05</a></li>
               <li class="item"><a href="">导航06</a></li>

           </ul>
       </div>
   </div>
   <div class="container">
       <div class="wrop">
           <div class="min">
               
           </div>
       </div>

        <div class="left">左部区域</div>
       <div class="right">右部区域</div>
   </div>
   <div class="footer"></div>
</body>
</html>

屏幕快照 2019-07-09 下午4.09.25.png



批改状态:合格

老师批语:抽空了解一下, 还有一个叫圣杯的, 也它很相似
本博文版权归博主所有,转载请注明地址!如有侵权、违法,请联系admin@php.cn举报处理!
全部评论 文明上网理性发言,请遵守新闻评论服务协议
0条评论
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号

  • 登录PHP中文网,和优秀的人一起学习!
    全站2000+教程免费学