1,文档流布局
块级元素(有宽和高,独占一行,大盒子)
内联元素(内容决定高度和宽度,装不下会换行)
display转换
display:block 转化块(显示)
diaplay:inline 转化行内
display:inline-block 转化行内块
display:none 隐藏
2,(position)定位布局
position:relative 相对定位(保留位置)
position:absolute 绝对定位(不保留位置)
position:fixed 固定定位(固定位置)
position:sticky 粘性定位(它允许被定位的元素表现得像相对定位一样,
直到它滚动到某个阈值点(例如,从视口顶部起10像素)为止,此后它就变得固定了)
使用方位来确定位置
top:5px
button:5px
left:5px
right:5px
子绝父相,或者子绝父绝
z-index(重叠顺序)
z-index:1
z-index:2
z-index:3
数字越大越越靠前
z-index:auto 堆叠层级和父级相同
z-index:integer 堆叠层级为0
3.(float)浮动定位
float:left 左浮
float:right 右浮
float:none 默认不浮
float:inherit 继承
clear属性 清除
clear:left 清除左浮
clear:right 清除右浮
clear:both 两边都清除
4,## (flex)弹性布局补充
##orde
orde:1 数字越小排列顺序越靠前
align-self( align-self 属性覆盖 align-items 的行为。)
button:first-child {
align-self: flex-end;
}