Flex  页面布局 很方便  快捷  

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>flex-1</title>
<style type="text/css">
*{
margin: 0;
padding: 0;
}
body,html{
height: 100%
}
.col{
height: 100%;
background: #e3e3e3;
display: flex;
/* 正好与横向的属性设置相反 */
flex-direction:column;/* 将方向设置为垂直*/
justify-content: space-between;/* 两端对齐*/
align-items: center;/* 水平居中 */
} .head{
width: 200px;
height: 60px;
line-height: 60px;
text-align: center;
background: #fff;
} .content{
width: 300px;
height: 400px;
background: green;
} .row-between{
width: 90%;
margin-bottom: 10px;
display: flex;
justify-content: space-between;
} .logo{
width: 50px;
height: 30px;
line-height: 30px;
background: pink;
text-align: center;
color:#fff;
} button{
width: 100px;
height: 30px;
border:1px solid pink;
border-radius: 8px;
background: #fff;
} </style>
</head>
<body> <div class="col"> <div class="head"> 我是个放头像的地方 </div> <div class="content">sdfasfasdfasdfasdfasdfasdfsaddfasdfasdfasdfasdf dfasdfasdfsaddfasdfasdfasdf</div> <div class="row-between"> <button>按钮一</button> <div class="logo"> logo </div> <button>按钮二</button> </div> </div> </body>
</html>

flex-1

我是个放头像的地方
sdfasfasdfasdfasdfasdfasdfsaddfasdfasdfasdfasdf dfasdfasdfsaddfasdfasdfasdf
按钮一

logo

按钮二

最新文章

  1. Linux上搭建Hadoop2.6.3集群以及WIN7通过Eclipse开发MapReduce的demo
  2. Xamarin笔记
  3. Web项目中删错文件怎么办
  4. date
  5. WPF TextBlock 绑定 换行
  6. jQuery实现隔行变色
  7. ffmpeg/ffplay vc6 源码剖析
  8. 【Mysql】安装 mysql-5.7.5 指南
  9. CSS code snip enjoy.
  10. vsphere client cd/dvd 驱动器1 正在连接
  11. 调整系统的inode数量
  12. java_web学习(十一) 层的概念与应用
  13. php+xdebug+dbgp远程调试(多人)
  14. 在线制作微信跳转浏览器下载app/打开指定页面源码
  15. HttpClient与浏览器调用服务接口差异
  16. Mac生成rsa证书
  17. 2018.10.27 loj#6035. 「雅礼集训 2017 Day4」洗衣服(贪心+堆)
  18. 使用JDBC一次执行多条语句(以MySQL为例)
  19. Jenkins CI CD
  20. C语言编程流程

热门文章

  1. document.ready与window.load区别
  2. selenium2 断言失败自动截图 (四)
  3. 581. Shortest Unsorted Continuous Subarray连续数组中的递增异常情况
  4. 如何从Win7上卸载Sql 2008 R2 Express,再重装
  5. sql server 错误总结
  6. hdu1269 Tarjan强连通分量 模板(转)
  7. initWithFrame 和 initWithCoder 区别?
  8. 编写高质量代码改善C#程序的157个建议——建议6: 区别readonly和const的使用方法
  9. Go语言最佳实践——通道和并发
  10. sqlserver跨服务器查询