如果用stylus语法可以这样写:
px2rem($px)
$rem = 37.5px
($px / $rem)rem
.header
height: px2rem(40px)
background-color: red
px2rem($px)
$rem = 37.5px
($px / $rem)rem
.header
height: px2rem(40px)
background-color: red
2018-04-03