html - 将图像直接放置在彼此之上

标签 html css image

我有这个 HTML 代码,我只想将图像直接放在彼此的顶部。 (所以它们之间没有这条绿线) 如何做到这一点?

示例网址:http://todolist.x10.mx/test.html

HTML 代码:

<!DOCTYPE html>

<html>
<head>

<title>test</title>
<meta http-equiv="Content-Type" content="text/html">
</head>
<body bgcolor="green">
<img src="f.jpg" width="200" height="80" alt="plaatje1" style="border:none;padding:0px;spacing:0px;margin:0px"><br>
<img src="f.jpg" width="200" height="80" alt="plaatje2" style="border:none;padding:0px;spacing:0px;margin:0px"><br>
</body>
</html>

最佳答案

不要使用
而是添加以下CSS:

img {
margin: 0;
display: block;
}

关于html - 将图像直接放置在彼此之上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22280436/

相关文章:

css - 用作背景图像时如何缩放 CSS Sprite ?

ios - 无法从我的项目中的框架加载图像

css - Div 不居中 Bootstrap css

string - 在 Matlab 中对图像名称文件进行排序?

css repeat-x 右侧

html - 我想在小屏幕上使用 google adsense 横幅调整我的段落

javascript - 在页面加载时使用动画增加 ul 自动高度

javascript - 如果使用 IE9 Specific 的条件注释,我可以交换索引页中包含的 js 文件吗

html - 为什么 grid-template-rows 轨道模式不像 grid-template-columns 那样重复

html - 删除 div 容器之间的空格和间隙