Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
604 views
in Technique[技术] by (71.8m points)

postcss编译css时,把css中已有的rem单位又转成了px单位,如何设置成忽略这个转化

.coupon-kind{

        float:left;
        width:1.52rem;
        height:100%;
        font-size:.48rem;
        color:#fff;
        letter-spacing: 1rem;
    }

转换之后
.coupon-kind{

float:left;
width: 24.32px;
width:1.52rem;
height:100%;
font-size: 7.68px;
font-size:.48rem;
color:#fff;
letter-spacing: 16px;
letter-spacing: 1rem;

}


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

postcss-cssnext 插件中的 rem 关掉就可以了,参考文档:http://cssnext.io/features/#r...


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...