如何在HTML,CSS中使用无边距图像的侧面图像 [英] how to use no margin image side image in html, css
本文介绍了如何在HTML,CSS中使用无边距图像的侧面图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我要显示这四张图像而没有任何空白.该怎么做?
I want to show this four images without any margin. How to do this?
每个A,B,C,D看起来像一张图片.
Each A,B,C,D look like one image.
A
B
C
D
A
B
C
D
<div align="center">
<img src="a.png">
<br/>
<img src="b.png">
<br/>
<img src="c.png">
<br/>
<img src="d.png">
</div>
我尝试了css margin = 0和样式填充= 0,但是没有用.
I tried css margin=0 and style padding =0 but it is not working.
更新---
<img id="ImgEmotion" src="a.png" width="40" border="0">
<img src="b.png" width="20" height="20" border="0">
如果我使用CSS,我知道没有保证金.
If I use css, I know there are no margin.
如果我使用#no_margin
,如何申请img标签?我还需要'id='ImgEmotion'
.
If I use #no_margin
, how can I apply to img tag? Also I need the 'id='ImgEmotion'
.
推荐答案
CSS:
img
{
margin:0;
display:block
}
HTML:
<div align="center">
<img src="a.png">
<img src="b.png">
<img src="c.png">
<img src="d.png">
</div>
这篇关于如何在HTML,CSS中使用无边距图像的侧面图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文