父元素div背景为白色并设置了圆角和溢出隐藏,子元素是一张图片,在圆角位置会有白边,怎么解决啊?
<!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>
*{
margin: 0;
padding: 0;
}
body{
background-color: #000;
height:100vh;
width: 100vw;
display: flex;
justify-content: center;
align-items: center;
}
div {
width: 1280px;
height: 720px;
border-radius: 36px;
background: #fff;
overflow: hidden;
font-size: 0;
}
img {
width: 100%;
height: 100%;
transition: 250ms;
}
img:hover{
transform: scale(1.2);
}
</style>
</head>
<body>
<div>
<img src="https://drive.le5lecdn.com/2023/1130/1/1/冷源群控系统_e37d8fb3" alt="">
</div>
</body>
</html>
我希望能够消除这些白边
这样加个伪类把: