如何使用rem

body {
font-size: 62.5%
}

.con {
width: 100%;
max-width: 75rem;
box-sizing: border-box;
margin: 0 auto;
background: #fff;
}

.header img {
width: 0.9rem;
margin-right: 1.6rem;
}

.header {
text-align: left;
padding: 1.4rem 1.5rem;
display: flex;
align-items: center;
justify-content: flex-start;
}

.header .text {
text-align: left;
padding: 0;
}



@media only screen and (min-width: 320px) {
html {
font-size: 62.5% !important;
}
}

@media only screen and (min-width: 640px) {
html {
font-size: 125% !important;
}
}

@media only screen and (min-width: 750px) {
html {
font-size: 150% !important;
}
}
</style>

posted @ 2019-07-02 15:07  皓ma  阅读(332)  评论(0)    收藏  举报