把图片当作文字去看待即可!
给它设置文字的属性即可!
<!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>
</head>
<style></style>
<body style="margin: 0; padding: 0">
<div
style="
height: 500px;
text-align: center;
width: 500px;
border: green solid 1px;
margin: auto;
padding: 0;
line-height: 500px;
"
>
<img
alt=""
src="https://uploadfile.bizhizu.cn/up/4c/86/a8/4c86a84e756ecbf04717ae8383311e36.jpeg"
style="margin: 0 auto; width: 100px; height: 100px"
/>
</div>
</body>
</html>