vue项目rem适配

src-assets-css-base.css

@charset "utf-8";
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: "SF Pro SC", "SF Pro Display", "SF Pro Icons", "PingFang SC", sans-serif,
  "Helvetica Neue", "Helvetica", "Arial", "PingFangSC-Regula", sans-serif;
}
body {
  background: #fff;
  color: #3e3a39;
}
@media screen and (max-width: 750px) {
  html {
    font-size: calc(100vw / 7.5);
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  }
}
@media screen and (min-width: 751px) {
  html {
    font-size: 300%;
    max-width: 750px;
    margin: 0 auto;
  }
}
@media screen and (min-width: 980px) {
  html {
    /* font-size: 100%; */
    max-width: 100vw;
    margin: 0;
  }
}
li,
ol {
  list-style: none;
}
a {
  text-decoration: none;
}
em {
  font-style: normal;
}
img {
  display: block;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: normal;
}
input,
textarea,
select,
button {
  outline: none;
}
input {
  -webkit-appearance: none;
  appearance: none;
}
button,
input {
  border: none;
  outline: none;
}
input::-webkit-datetime-edit-fields-wrapper {
  /* visibility: hidden; */
}
input[type="date"]::-webkit-inner-spin-button {
  visibility: hidden;
}
textarea,
input[type="password"],
input[type="text"] {
  resize: none;
  outline: 0;
  -webkit-appearance: none;
}
/*清除浮动代码*/
.clearfloat:after {
  display: block;
  clear: both;
  content: "";
  visibility: hidden;
  height: 0;
}
.clearfloat {
  zoom: 1;
}
input::-webkit-input-placeholder {
  font-size: 0.3rem;
  color: #d5d1d1 !important;
}
textarea::-webkit-input-placeholder {
  color: #d5d1d1 !important;
  font-size: 0.3rem;
}
textarea::placeholder {
  color: #d5d1d1 !important;
  font-size: 0.3rem;
}
/* 1px线 */
.border-bottom {
  position: relative;
}
.border-bottom:before {
  content: "";
  position: absolute;
  width: 200%;
  height: 1px;
  bottom: 0;
  left: 0;
  border-bottom: 1px solid #e8e8e8;
  -webkit-transform-origin: 0 0;
  transform-origin: 0 0;
  -webkit-transform: scale(0.5, 0.5);
  transform: scale(0.5, 0.5);
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

main.js

import './assets/css/base.css'
  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值