q441276270 2022-12-22 18:05 采纳率: 83.3%
浏览 16
已结题

要把css里的px统一换成rem.比例是1:40要怎么批量替换呢

要把css里的px统一换成rem.比例是1:40要怎么批量替换呢

.box {
  .box-header {
    padding: 2.1rem 0;
    color: #393939;
    text-align: center;

    .title {
      font-size: 34px;
      font-weight: bold;
      line-height: 41px;
      text-align: center;
      color: #333333;
    }

    .label {
      margin-top: 18px;
      font-size: 18px;
      font-weight: normal;
      line-height: 22px;
      text-align: center;
      color: #666666;
    }
  }

  .box-content {
    .buttons {
      a {
        margin: 0 auto;
        display: block;
        width: 170px;
        height: 44px;
        border-radius: 6px;
        opacity: 1;
        background: #FF7226;
        text-align: center;
        font-size: 16px;
        font-weight: bold;
        line-height: 44px;
        letter-spacing: 5.33px;
        color: #FFFFFF;
      }
    }
  }
}

  • 写回答

1条回答 默认 最新

  • 土拨鼠1号 2022-12-23 09:12
    关注

    复制文本到控制台,正则匹配吧 要想快的话

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

问题事件

  • 系统已结题 4月22日
  • 已采纳回答 4月14日
  • 创建了问题 12月22日