【原创】display:flex布局大全
全都是自己写的 希望大家可以点个赞 谢谢!
Html代码(没时间精简 请多包涵)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Flex布局大全</title>
<style>
body,html{
width: %;
height: %;
display: flex;
justify-content: space-between;
}
.fore{
width: 700px;
height: 277px;
margin: auto;
display: flex;
justify-content:space-around;
flex-wrap: wrap;
}
.row1,.row2,.row3{
width: 700px;
height: 95px;
display: flex;
justify-content: space-around;
}
.row1{
margin-top: 8px;
}
.father{
background-color: #;
height: 70px;
width: 70px;
border-radius: 8px ;
}
.son{
width: 20px;
height: 20px;
border-radius: 10px;
background-color: #fff;
}
.father2{
display: flex;
justify-content: center;
}
.father3{
display: flex;
justify-content: flex-end;
}
.father4{
display: flex;
justify-content: space-between;
}
.father5{
display: flex;
justify-content: flex-end;
}
.foreSom{
display: flex;
flex-direction: column;
justify-content: space-between;
}
.father6{
display: flex;
justify-content: space-between;
} .foreSon32{
display: flex;
flex-direction: column;
justify-content: center;
}
.foreSon33{
display: flex;
flex-direction: column;
justify-content: flex-end;
}
.father7{
display: flex;
justify-content: space-between;
}
.foreSon51{
display: flex;
flex-direction: column;
justify-content: space-between;
}
.foreSon52{
display: flex;
flex-direction: column;
justify-content: center;
}
.foreSon53{
display: flex;
flex-direction: column;
justify-content: space-between;
} /* 第二行 */
.father2-{
display: flex;
justify-content: flex-start;
align-items: center;
}
.father2-{
display: flex;
justify-content: center;
align-items: center;
}
.father2-{
display: flex;
justify-content: flex-end;
align-items: center;
}
.father2-{
display: flex;
flex-direction: column;
justify-content: space-between;
}
.father2-{
display: flex;
justify-content: space-between;
align-items: flex-end;
}
.father2-{
display: flex;
justify-content: space-between;
flex-wrap: wrap;
}
.foreSon2-{
display: flex;
flex-direction: column;
justify-content: space-between;
} .father2-{
display: flex;
justify-content: space-between;
flex-wrap: wrap;
}
.foreSon2-{
display: flex;
flex-direction: column;
justify-content: space-between;
}
.father3-{
display: flex;
align-items: flex-end;
}
.father3-{
display: flex;
align-items: flex-end;
justify-content: center;
}
.father3-{
display: flex;
align-items: flex-end;
justify-content: flex-end;
}
.father3-{
display: flex;
}
.foreSon3--{
display: flex;
}
.foreSon3--{
align-self: center;
}
.father3-{
display: flex;
justify-content: space-between;
}
.foreSon3--{
align-self: center;
}
.father3-{
display: flex;
justify-content: space-between;
}
.foreSon3--{
align-self: flex-end;
}
.father3-{
display: flex;
flex-wrap: wrap;
}
.foreSon3--{
display: flex;
flex-basis: %;
justify-content: space-between;
}
.foreSon3--{
display: flex;
flex-basis: 70px;
justify-content: center;
}
.foreSon3--{
display: flex;
justify-content: space-between;
flex-basis: %;
} </style>
</head>
<body>
<div class="fore">
<div class="row1">
<div class="father">
<div class="son1 son"></div>
</div>
<div class="father father2">
<div class="son1 son"></div>
</div>
<div class="father father3">
<div class="son1 son"></div>
</div>
<div class="father father4">
<div class="son1 son"></div>
<div class="son1 son"></div>
</div>
<div class="father father5">
<div class="foreSom">
<div class="son1 son"></div>
<div class="son1 son"></div>
</div>
</div>
<div class="father father6">
<div class="foreSon31">
<div class="son1 son"></div>
</div>
<div class="foreSon32">
<div class="son1 son"></div>
</div>
<div class="foreSon33">
<div class="son1 son"></div>
</div>
</div>
<div class="father father7">
<div class="foreSon51">
<div class="son1 son"></div>
<div class="son1 son"></div>
</div>
<div class="foreSon52">
<div class="son1 son"></div>
</div>
<div class="foreSon53">
<div class="son1 son"></div>
<div class="son1 son"></div>
</div>
</div> </div>
<div class="row2">
<div class="father father2-1">
<div class="son1 son"></div>
</div>
<div class="father father2-2">
<div class="son1 son"></div>
</div>
<div class="father father2-3">
<div class="son1 son"></div>
</div>
<div class="father father2-4">
<div class="son1 son"></div>
<div class="son1 son"></div>
</div>
<div class="father father2-5">
<div class="son1 son"></div>
<div class="son1 son"></div>
</div>
<div class="father father2-6">
<div class="foreSon2-6">
<div class="son1 son"></div>
<div class="son1 son"></div>
</div>
<div class="foreSon2-6">
<div class="son1 son"></div>
<div class="son1 son"></div>
</div>
</div>
<div class="father father2-7">
<div class="foreSon2-7">
<div class="son1 son"></div>
<div class="son1 son"></div>
<div class="son1 son"></div>
</div>
<div class="foreSon2-7">
<div class="son1 son"></div>
<div class="son1 son"></div>
<div class="son1 son"></div>
</div>
</div>
</div>
<div class="row3">
<div class="father father3-1">
<div class="son1 son"></div>
</div>
<div class="father father3-2">
<div class="son1 son"></div>
</div>
<div class="father father3-3">
<div class="son1 son"></div>
</div>
<div class="father father3-4">
<div class="foreSon3-4-1">
<div class="son1 son"></div>
</div>
<div class="foreSon3-4-2">
<div class="son1 son"></div>
</div>
</div>
<div class="father father3-5">
<div class="foreSon3-5-1">
<div class="son1 son"></div>
</div>
<div class="foreSon3-5-2">
<div class="son1 son"></div>
</div>
</div>
<div class="father father3-6">
<div class="foreSon3-6-1">
<div class="son1 son"></div>
</div>
<div class="foreSon3-6-2">
<div class="son1 son"></div>
</div>
</div>
<div class="father father3-7">
<div class="foreSon3-7-1">
<div class="son1 son"></div>
<div class="son1 son"></div>
</div>
<div class="foreSon3-7-2">
<div class="son1 son"></div>
</div>
<div class="foreSon3-7-3">
<div class="son1 son"></div>
<div class="son1 son"></div>
<div class="son1 son"></div>
</div>
</div>
</div>
</div> </body>
</html>
全都是自己写的 希望大家可以点个赞!!!(顺便凑下字数)
全都是自己写的 希望大家可以点个赞!!!(顺便凑下字数)
全都是自己写的 希望大家可以点个赞!!!(顺便凑下字数)
全都是自己写的 希望大家可以点个赞!!!(顺便凑下字数)
全都是自己写的 希望大家可以点个赞!!!(顺便凑下字数)
全都是自己写的 希望大家可以点个赞!!!(顺便凑下字数)
全都是自己写的 希望大家可以点个赞!!!(顺便凑下字数)
全都是自己写的 希望大家可以点个赞!!!(顺便凑下字数)
全都是自己写的 希望大家可以点个赞!!!(顺便凑下字数)
全都是自己写的 希望大家可以点个赞!!!(顺便凑下字数)
【原创】display:flex布局大全的更多相关文章
- 1.display:flex布局笔记
/*display:flex布局方式主要运用于垂直居中的效果*/ 一.Flex译为Flexible Box(弹性盒子),任何一个容器都可以指定为Flex布局 注:设置为Flex布局之后,子元素的flo ...
- display:flex 布局教程,弹性布局!
display:flex 布局教程 布局的传统解决方案,基于盒状模型,依赖 display属性 + position属性 + float属性.它对于那些特殊布局非常不方便,比如,垂直居中就不容易实现. ...
- display:flex布局
/*背景 居中 自适应 铺满容器*/ background: center / cover; flex布局是什么? flex是Flexibe Box 的缩写,意思为”弹性布局”, 用来为盒子模型提供最 ...
- HTML/CSS:display:flex 布局教程
网页布局(layout)是 CSS 的一个重点应用. 布局的传统解决方案,基于盒状模型,依赖 display 属性 + position属性 + float属性.它对于那些特殊布局非常不方便,比如,垂 ...
- display:flex 布局详解(2)
1. flex设置元素垂直居中对齐 在之前的一篇文章中记载过如何垂直居中对齐,方法有很多,但是在学习了flex布局之后,垂直居中更加容易实现 HTML代码: <div class=" ...
- display: flex; 布局
废话不多说,供上我学习Flex布局的启蒙文章,一切的答案,尽在这里,仔细阅读,多多回味!保证你有所收获! http://www.ruanyifeng.com/blog/2015/07/flex-gra ...
- display:flex 布局之 骰子
代码部分 html <body> <div class="box"> <div class="a a1"> <span ...
- flex布局大全 2019
有句话叫做:存在即是合理. 最近很喜欢flex布局模式,不过还在摸索中,这里正一边在项目中使用和总结,也在学习一些大牛们总结的东西和布局思考. 鉴于自己很苦恼,到处去ha资料,真的,就没有一个系统的, ...
- flex布局大全
有句话叫做:存在即是合理. 最近很喜欢flex布局模式,不过还在摸索中,这里正一边在项目中使用和总结,也在学习一些大牛们总结的东西和布局思考. 鉴于自己很苦恼,到处去ha资料,真的,就没有一个系统的, ...
随机推荐
- VirtualBox下安装Linux系统
Linux 开源的类Unix操作系统,拥有图形界面文字界面,旗下发行版不胜其数(Ubuntu.Deepin.CentOS...)在互联网公司中Linux服务器大多是用的CentOS系统,其他Linux ...
- 【CodeForces - 1167C 】News Distribution(并查集)
News Distribution 题意 大概就是分成几个小团体,给每个人用1 - n编号,当对某个人传播消息的时候,整个小团体就知道这个消息,输出 分别对1 - n编号的某个人传递消息时,有多少人知 ...
- Git对象
上一节了解了 Git 的一个重要的概念:暂存区. 暂存区是一个介于工作区和版本库的中间状态,当执行commit时,实际上是将暂存区的内容提交大版本库中,而执行add则是将本次变更添加到暂存区. 上一节 ...
- 基于tcp协议的登录,文件上传和下载
[1]先登录,登录不成功循环登录,直到成功.登录成功后可以选择上传或者下载,上传有对应的文件,可选择上传哪个:下载有对应的文件,可选择下载哪个 [2]登录,上传,下载时最好设置状态码,客户端和 ...
- 机器学习-特征值,svd分解
求矩阵的秩 设 ,已知r(A)=2,则参数x,y分别是 解:任意三阶子式=0,有二阶子式≠0,但是这些子式比较多,可以使用初等变换,因为初等变换不改变矩阵的秩,可以将矩阵通过初等行(列)变换,化为行阶 ...
- JS+Jquery自定义格式导出HTML为Word(下列插件同样可以用于Excel导出)
这里的word导出主要采用了jquery.wordexport.js.FileSaver.js,做功能之前我也是找了很多网上的资料,里面涉及到js导出word的用的都是这个插件,只是在自定义样式这一块 ...
- 《VR入门系列教程》之4---运行平台
运行平台 大多数的VR应用都可以在目前多数的PC和手机上运行,基本上一个不太旧的PC或者配置好点的笔记本电脑都可以正常运行Oculus Rift,如果手机的CPU和显卡不错的话也可以有很好的V ...
- python课堂整理1
1.变量 变量只能由字母.数字.下划线组成 特例:1.变量不能用数字开头 2.不能是python的关键字 3.最好不要和python内置的东西重复 让变量名有意义 些 python3的关键字 ...
- web设计_5_自由的框式组件
1. CSS3 border-radius 圆角矩形框 圆角矩形框组件是页面布局中常常用到的,利用CSS3的border-radius可非常方便的创建. 并且在横向纵向上面都有很好的扩展性和灵活性. ...
- ansible-yum
#yum 需要在vim /etc/ansible/hosts里面给执行的主机配置 远程调用python的路径不知道为什么默认值认识python2.6.6 vim /etc/ansible/hosts ...