css样式H5开发点注意

样式限制使用记录
1、align-items center可以用,end不行
justify-content: end;
/* ---- 改成下面的写法 ---- */
justify-content: flex-end;

2、align-self top不能用 华为有的手机不适配
size是24的有文字icon的行高至少给30

3、display:flex;gap:16rpx; ios gap失效

4、渐变字体样式需要给省略号给个颜色

<div class="text-nick-name text-hidden":text="我们都是好孩子">我们都是好孩子"</div>

                .text-nick-name {
                  position: relative;
                  font-weight: 400;
                  font-size: 0.25rem;
                  color: #FF7B3A;
                  &::before {
                    content: attr(text);
                    position: absolute;
                    left: 0;
                    right: 0;
                    -webkit-text-stroke: initial;
                    color: transparent;
                    -webkit-text-stroke: initial;
                    background: linear-gradient(to bottom,  #FFF728, #FF7B3A 80%);
                    background-clip: text;
                    -webkit-background-clip: text;
                    -webkit-text-fill-color: transparent;
                    text-overflow: ellipsis;
                    white-space: nowrap;
                    overflow: hidden;
                    color: #FF7B3A;
                  }
                }

5、用路径参数就可以避免查询参数会出现俩问号的情况

​
path: '/user/:id',
router.push({ path: `/user/123` });
router.push({ name: 'user', params: { id: '123' } });
const route = useRoute();console.log(route.params.id);

​

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值