问题描述
我有一个网格的图像,它们之间有空格。如何删除此空格?
I have a grid of images with space between them. How do I remove this space?
我已经尝试设置 c> c>的 c> c>
I have already tried setting the padding and margin of the images to 0px but it has not worked.
/ p>
Any ideas?
推荐答案
确保您的HTML标记中没有任何空格。所以改变:
Make sure you don't have any spaces in your html markup. So change:
<img src="" alt="" /> <img src="" alt="" />
到
<img src="" alt="" /><img src="" alt="" />
有时空格也可以隐藏在新行的结尾,因此请务必检查行尾如果你的HTML看起来像
Sometimes spaces can hide at the end of new lines too, so be sure to check the end of lines if your html looks like
<img src="" alt="" /> <img src="" alt="" />
编辑
code>< img src =imgs / img8.jpgstyle =margin:0; width:300; height:300; /> 87次,只需将其放在您的css文件中:
Edit
Instead of writing: <img src="imgs/img8.jpg" style="margin: 0; width: 300; height: 300;" /> 87 times, just put this in your css file:
div img { margin: 0; width: 300px; height: 300px; }
,然后你可以简单地使你的图片< img src =imgs / img8.jpgalt =img8/>
and then you can simply make your images <img src="imgs/img8.jpg" alt="img8" />
这篇关于图像并排,它们之间没有任何空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!