<!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>
.scale-1px {
position: relative;
width: 200px;
height: 30px;
border-radius: 8px;
}
.scale-1px:after {
content: "";
pointer-events: none;
/* 防止点击触发 */
box-sizing: border-box;
position: absolute;
width:100%;
height:100%;
left: 0;
top: 0;
border-radius: 8px;
border: 1px solid #999;
transform:(scale(0.5));
transform-origin: 0 0;
}
</style>
</head>
<body>
<div class="box">
<div class="b scale-1px">dfsdfdf</div>
</div>
</body>
</html>