css使用rem自适应

css设置html的fontsize 

html {
  font-size: 1/19.2vw // 0.052083333333333336vw;;
}

在页面的元素全都按照设计图px写rem

.container {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    width: calc(100% - 32rem);
    height: calc(100% - 32rem);
    margin: auto;
    // padding: 0 16rem;
    .lefWrap {
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      width: 410rem;
      height: 100%;
    }
    .centerWrap {
      display: flex;
      flex: 1;
      flex-direction: column;
      justify-content: space-between;
      // position: relative;
      // width: 54%;
      max-width: calc(100% - 820rem);
      height: 100%;
      // margin: auto;
      padding: 0 16rem;
      /*  .boerddd {
        width: 13rem;
        height: 13rem;
        background: radial-gradient(rgba(97, 142, 255, 0.3) 25%, rgba(97, 142, 255, 0.6) 75%);
        // background-color: rgba(97, 142, 255, 0.6);
        border: solid 1rem rgba(97, 142, 255, 1);
        transform: rotate(45deg);
      } */
    }
    .rightWrap {
      // padding-bottom: 14rem;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      width: 410rem;
      height: 100%;
    }
  }

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值