2020/8/26(选择器 flex)

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值