浮动练习(3)

##每台电脑分辨率不同,数值高度宽度需要自己调,仅供参考

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>

<style>

div{

display: flex;

align-items: center;

justify-content: center;

}

.main{

width: 100%;

font-size: 24px;

/*text-align: center;*/

display: block;

}

.main .banner{

widows: 100%;

height: 100px;

/*background: red;*/

}

.main .banner .logo{

background: gainsboro;

width: 20%;

height: 100%;

float: left;

}

.main .banner .banner1{

background: gainsboro;

width: 58%;

height: 100%;

float: left;

margin: 0px 19px;

}

.main .banner .banner2{

background: gainsboro;

width: 20%;

height: 100%;

float: left;

}

.main .menu{

width: 100%;

height: 43px;

background: gainsboro;

margin: 16px 0px;

}

.main .container{

display: block;

height: 680px;

}

.main .container .lanmu{

width: 653px;

/*background: gainsboro;*/

height:100%;

float: left;

margin-right: 15px;

display: block;

}

.main .container .lanmu2{

width: 457px;

/*background: gainsboro;*/

height:100%;

float: left;

display: block;

}

.lanmu .lanmu3{

width: 655px;

height: 300px;

border: 2px solid black;

}

.lanmu .lanmu4{

width: 309px;

height: 355px;

border: 2px solid black;

margin: 15px 15px 0px 0px;

display: inline-block;

float: left;

}

.lanmu .lanmu5{

margin-right: 0px;

}

.lanmu2 .lanmu6{

width: 450px;

height: 212px;

border: 2px solid black;

margin-bottom: 16px;

}

.foot{

width: 100%;

height: 80px;

background: gainsboro;

margin: 16px 0px;

}

</style>

</head>
<body>

<div class="main">

<div class="banner">

<div class="logo">logo</div>

<div class="banner1">banner1</div>

<div class="banner2">banner2</div>

</div>

<div class="menu">菜单</div>

<div class="container">

<div class="lanmu">

<div class="lanmu3">栏目一</div>

<div class="lanmu4">栏目三</div>

<div class="lanmu4 lanmu5">栏目四</div>

</div>

<div class="lanmu">

<div class="lanmu3">栏目二</div>

<div class="lanmu4">栏目五</div>

<div class="lanmu4 lanmu5">栏目六</div>

</div>

<div class="lanmu2">

<div class="lanmu6">栏目七</div>

<div class="lanmu6">栏目八</div>

<div class="lanmu6">栏目九</div>

</div>

</div>

<div class="foot">页脚</div>

</div>
</body>
</html>

相关推荐
杨超越luckly9 分钟前
HTML应用指南:利用GET请求获取中国500强企业名单,揭秘企业增长、分化与转型的新常态
前端·数据库·html·可视化·中国500强
夏幻灵2 小时前
CSS三大特性:层叠、继承与优先级解析
前端·css
会编程的土豆19 小时前
新手前端小细节
前端·css·html·项目
周航宇JoeZhou19 小时前
JB2-7-HTML
java·前端·容器·html·h5·标签·表单
代码小库19 小时前
【课程作业必备】Web开发技术HTML静态网站模板 - 校园动漫社团主题完整源码
前端·html
云计算DevOps-韩老师19 小时前
HTML 中的行级元素(inline)、块级元素(block)、行内块元素(inline-block)
html
珹洺19 小时前
Bootstrap-HTML(二)深入探索容器,网格系统和排版
前端·css·bootstrap·html·dubbo
BillKu19 小时前
VS Code HTML CSS Support 插件详解
前端·css·html
咔咔一顿操作1 天前
轻量无依赖!autoviwe 页面自适应组件实战:从安装到源码深度解析
javascript·arcgis·npm·css3·html5
HetFrame1 天前
一种纯前端实现 Markdown 内容即时分享的思路
html·react·链接·markdown·工具