<!DOCTYPE html>
<html lang="en"> <head>
<meta charset="UTF-8">
<title>Document</title>
<style>
.flex-container {
display: flex;
height: 400px;
background-color: gray;
} .flex-item {
background-color: green;
width: 100px;
height: 100px;
margin: 5px; /*flex属性是flex-grow, flex-shrink 和 flex-basis的简写,默认值为0 1 auto*/ /*flex: auto即flex:1 1 auto;各个子盒子均等分*/
/*flex: auto;*/ /*flex: none即flex:0 0 auto;子盒子将不具有伸缩性*/
/*flex:none;*/
} /*flex:[number],子盒子按比例分割*/
.flex-item:nth-child(1) {
flex: 2
} .flex-item:nth-child(2) {
flex: 1
} .flex-item:nth-child(3) {
flex: 1
}
</style>
</head> <body>
<div class="flex-container">
<div class="flex-item">flex item 1</div>
<div class="flex-item">flex item 2</div>
<div class="flex-item">flex item 3</div>
</div>
</body> </html>

最新文章

  1. 用ElasticSearch和Protovis实现数据可视化
  2. php的Excel相关操作
  3. morris.js 简单学习
  4. vim使用指北 ---- Global Replacement
  5. 判断浏览器IE6
  6. SVN最有效的方法打基线
  7. 【leetcode78】Single Number II
  8. 24分钟让AI跑起飞车类游戏
  9. 图片上传组件webuploader
  10. iOS推送证书生成pem文件(详细步骤)
  11. 用OpenGL实现动态的立体时钟
  12. boot中 Quartz注入spring管理类失败
  13. 20155210 Exp2 后门原理与实践
  14. spring定时任务注解@Scheduled的记录
  15. react native基础与入门
  16. linux清空文件方法
  17. P4168 [Violet]蒲公英 区间众数
  18. CodeForces - 995B Suit and Tie
  19. rest_framework之访问频率控制
  20. request.getRequestDispatcher(url).forward(request, response)

热门文章

  1. 微信小程序——navigator无法跳转
  2. Python 文件操作三
  3. WinForm窗体继承
  4. Qt QTcpSocket 对连接服务器中断的不同情况进行判定
  5. chromedriver与chrome版本映射表(更新至v2.30)
  6. MyBatis错误:Result Maps collection already contains value for novel.storage.mapper.NovelMapper.BaseResultMap
  7. Android WiFi 扫描流程分析(wpa_supplicant选择网络)
  8. 对C语言中指针的入门理解
  9. 使用OpenSSL创建自己的CA root certificate
  10. HDU 5067 Harry And Dig Machine(状压DP)(TSP问题)