【发布时间】:2021-10-09 23:48:44
【问题描述】:
我有一个问题,当我更改屏幕大小时,rem 没有接收我的任何元素,例如,我在 body 上有一个 3rem 的填充,而我在 html 元素上的字体大小是 62.5%我调整屏幕大小,身体上的填充保持在 3rem 或 30 像素
*,
*::after,
*::before {
margin: 0;
padding: 0;
box-sizing: inherit;
}
html {
font-size: 62.5%;
}
body {
font-family: "Lato", sans-serif;
font-weight: 400;
line-height: 1.7;
color: #777;
padding: 3rem;
box-sizing: border-box;
}
我还包含了视口元标记
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
【问题讨论】:
标签: css