<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
/* px相对像素单位 相对于当前设备分辨率 */
/* em 和 rem */
/* em是相对单位 相对于当前元素的字体大小而言 默认1em=16px */
div{
padding: 1em;
font-size: 28px;
}
/* rem相对单位 相对于html元素字体大小而言的 默认1rem=16px */
html{
font-size: 28px;
}
p{
/* padding: 1em; */
padding: 1rem;
}
</style>
</head>
<body>
<div>我是一个div</div>
<p>段落标签</p>
</body>
</html>