浮动练习(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>

相关推荐
志尊宝4 天前
Vue3 零基础每日笔记(055):组件里正确使用 store——storeToRefs 解构与 $patch 批量修改
笔记·vue·html·前端开发·软件开发
吴声子夜歌4 天前
HTML——看似普通的元素的背后(<a>标签)
html
IMPYLH4 天前
HTML 的 <style> 元素
前端·html
刃神太酷啦4 天前
前端入门第一课:HTML 基础语法 + 常用标签 + 实战全解
服务器·c语言·前端·javascript·css·c++·html
IMPYLH4 天前
HTML 的 <strong> 元素
前端·html
开开心心就好5 天前
批量提取PDF中的图片,直接导出原图
前端·javascript·支持向量机·智能手机·pdf·html·启发式算法
扶苏10025 天前
CSS 图标换色指南:用 brightness / invert / mask 把任意图片改成想要的颜色
css
我命由我123455 天前
CSS - CSS 媒体查询 orientation
前端·javascript·css·html·css3·html5·js
咩咩啃树皮5 天前
ES6 Set 核心特点 + 最简数组去重
前端·javascript·html
zhanghaha13145 天前
HTML系列教程:18_HTML / CSS 颜色零基础详解
css·html·tensorflow