class 选择器
结构伪类
1.:first-child
p:first-child{} 匹配p的父亲的第一个儿子,这个儿子也得是p
2.:last-child
3.:nth-child(n) n从1开始
span:nth-child(2){
font-size: 16px;
position: absolute;
width: 174px;
top: 0;
}
span:last-child{
font-size: 8px;
position: absolute;
bottom: 0;
}
否定伪类
elem:not(selector) 符合selector的元素都不要
&:not(:first-child) {
padding-top: 40px;
// background-color: red;
}
flex 的简写
flex: flex-grow、flex-shrink 、flex-basis缩写
flex: 0 1 auto;
flex-grow
如果主轴剩余空间够大,项目将按比例放大(比例不准确)
flex-grow:整数 默认值 0
flex-shrink
主轴空间不够时,项目将按比例缩小(比例不准确)
flex-shrink: 整数,取值越大,缩的越小,默认值为1