1. 行内块元素 img 图片空白
代码:
<!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>
img {
width: 200px;
}
</style>
</head>
<body>
<img src="./img/杨幂.jfif" alt="">
<img src="./img/杨幂.jfif" alt="">
<img src="./img/杨幂.jfif" alt="">
</body>
</html>
显示:
处理办法:
两张图片中间的空白,可以用div把两张图片放在一起,设置style为font-size=0.
代码如下:
<!DOCTYPE html>
<html lang