<!DOCTYPE html>
<html lang="zh-CN">
<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>
div {
position: relative;
width: 50px;
height: 50px;
/* border: rgb(0, 0, 0) 1px solid; */
}
/* 利用伪元素+定位 宽高放大原来的两倍 和边框1px一起缩小 0.5 */
/* 注意设置缩放基准点 */
div::after {
position: absolute;
top: 0;
left: 0;
content: '';
display: block;
width: 200%;
height: 200%;
border: rgb(0, 0, 0) 1px solid;
transform: scale(0.5);
transform-origin: 0 0
}
</style>
</head>
<body>
<div></div>
</body>
</html>