- 转化前
.box{
height: 50px;
background:#ccc;
font-size: 20px;
text-align: center;
line-height: 50px;
}
.content{
padding:10px;
font-size: 18px;
text-indent: 2em;
text-align: justify;
line-height: 1.5em;
}
- 转化后
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
*{
padding:0;
margin:0;
}
html{
font-size: 26.66666vw;
}
.box{
height: 0.5rem;
background:#ccc;
font-size: 0.2rem;
text-align: center;
line-height: 0.5rem;
}
.content{
padding:0.1rem;
font-size: 0.18rem;
text-indent: 2em;
text-align: justify;
line-height: 1.5em;
}
</style>
</head>
<body>
<div class="box">
首页
</div>
<div class="content">
今天,学响应式学到0:00点,无法自拔,想要早点睡但是控制不了,还挺喜欢在键盘上啪啪啪的感觉的
</div>
</body>
</html>
那怎么快速转化呢?用插件
点击右下角进行设置
意思是每rem有100px
选中要转化的代码,按alt+z进行转化