flexbox布局属性flex-direction属性的学习
2016-05-13 17:40
423 查看
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>伸缩布局flex-direction</title>
<style type="text/css">
#parent {
display: flex;
flex-direction: column;
}
#parent1 {
display: flex;
flex-direction: row;
}
#parent2 {
display: flex;
margin-top: 10px;
flex-direction: row-reverse;
}
#parent3 {
display: flex;
margin-top: 10px;
flex-direction: column;
}
#parent4 {
display: flex;
margin-top: 10px;
flex-direction: column-reverse;
}
#div1 {
width: 50px;
height: 50px;
background: blueviolet;
}
#div2 {
width: 50px;
height: 50px;
background: brown;
}
#div3 {
width: 50px;
height: 50px;
background: burlywood;
}
</style>
</head>
<body>
<div id="parent">
<div id="parent1">
flex-direction属性值为row的情况
<br />
<div id="div1">
1
</div>
<div id="div2">
2
</div>
<div id="div3">
3
</div>
</div>
<div id="parent2">
flex-direction属性值为row-reverse的情况
<div id="div1">
1
</div>
<div id="div2">
2
</div>
<div id="div3">
3
</div>
</div>
<div id="parent3">
flex-direction属性值为column的情况
<div id="div1">
1
</div>
<div id="div2">
2
</div>
<div id="div3">
3
</div>
</div>
<div id="parent4">
<div id="div1">
1
</div>
<div id="div2">
2
</div>
<div id="div3">
3
</div>
</div>
</div>
</body>
</html>
<html>
<head>
<meta charset="UTF-8">
<title>伸缩布局flex-direction</title>
<style type="text/css">
#parent {
display: flex;
flex-direction: column;
}
#parent1 {
display: flex;
flex-direction: row;
}
#parent2 {
display: flex;
margin-top: 10px;
flex-direction: row-reverse;
}
#parent3 {
display: flex;
margin-top: 10px;
flex-direction: column;
}
#parent4 {
display: flex;
margin-top: 10px;
flex-direction: column-reverse;
}
#div1 {
width: 50px;
height: 50px;
background: blueviolet;
}
#div2 {
width: 50px;
height: 50px;
background: brown;
}
#div3 {
width: 50px;
height: 50px;
background: burlywood;
}
</style>
</head>
<body>
<div id="parent">
<div id="parent1">
flex-direction属性值为row的情况
<br />
<div id="div1">
1
</div>
<div id="div2">
2
</div>
<div id="div3">
3
</div>
</div>
<div id="parent2">
flex-direction属性值为row-reverse的情况
<div id="div1">
1
</div>
<div id="div2">
2
</div>
<div id="div3">
3
</div>
</div>
<div id="parent3">
flex-direction属性值为column的情况
<div id="div1">
1
</div>
<div id="div2">
2
</div>
<div id="div3">
3
</div>
</div>
<div id="parent4">
<div id="div1">
1
</div>
<div id="div2">
2
</div>
<div id="div3">
3
</div>
</div>
</div>
</body>
</html>
相关文章推荐
- web前端开发初学者十问集锦(4)
- quartz笔记
- 算法16 之堆排序
- const的具体含义
- 流媒体服务器 笔记
- 使用truss、strace或ltrace诊断软件的"疑难杂症"
- 在bootstrap中让竖向排列的输入框水平排列
- 建造者模式
- 报这个错 unrecognized selector sent to instance
- 2011
- Android Studio 打包、生成jks密钥、签名Apk、多渠道打包
- 函数trunc日期时格式为ww、iw、w的区别
- SQLite 点命令简介
- linux net子系统-系统调用层
- Python常见问题(7):Python图形用户接口 Graphic User Interface FAQ
- poj 2777 count color
- 使用WireShark抓包分析Android网络请求时间(二)
- 【B/S】jQuery简介及语法
- mysql链表查询
- HDU_3182_Hamburger Magi_状态压缩dp