<!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>
.img-box{
width:100px;
height: 100px;
border-radius: 50%;
overflow: hidden;
}
.img{
width: 100%;
}
</style>
</head>
<body>
<div class="img-box">
<img class="img" src="https://t7.baidu.com/it/u=4162611394,4275913936&fm=193&f=GIF" alt="">
</div>
</body>
</html>
div直接设置样式 border-radius: 50%;不起作用,需要加 overflow: hidden;