<!DOCTYPE html><html><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>图片并排</title> <style type="text/css"> *{ margin:0px;margin: 0px; } .main{ width: 800px; } img{ width:25%; } </style></head><body> <div class="main"> <img src="particles-triangles-shattered-3d-13901-thumb.jpg" alt=""> <img src="particles-triangles-shattered-3d-13901-thumb.jpg" alt=""> <img src="particles-triangles-shattered-3d-13901-thumb.jpg" alt=""> <img src="particles-triangles-shattered-3d-13901-thumb.jpg" alt=""> </div></body></html>效果疑问:每张图片都是200,没有margin,但为什么有间隙
1 回答
已采纳
习惯受伤
TA贡献885条经验 获得超1144个赞
是由空格或空行造成的,把上边的这一段:
<img src="particles-triangles-shattered-3d-13901-thumb.jpg" alt=""> <img src="particles-triangles-shattered-3d-13901-thumb.jpg" alt=""> <img src="particles-triangles-shattered-3d-13901-thumb.jpg" alt=""> <img src="particles-triangles-shattered-3d-13901-thumb.jpg" alt="">
改成:
<img src="particles-triangles-shattered-3d-13901-thumb.jpg" alt=""><img src="particles-triangles-shattered-3d-13901-thumb.jpg" alt=""><img src="particles-triangles-shattered-3d-13901-thumb.jpg" alt=""><img src="particles-triangles-shattered-3d-13901-thumb.jpg" alt="">
- 1 回答
- 0 关注
- 1450 浏览
相关问题推荐
添加回答
举报
0/150
提交
取消