在图像之间增加空间

Nig*_*gel 1 html css

如何在后面的图像中添加一些空间意味着我想要在后面的图像之间有水平空间

<p class="menusomething">In-game Imagery</br>
<a href="R.jpg"><img src="age1.jpg" width="200" height="150"/>          </a></br>
<a href="Re2.jpg"><img src="age2.jpg" width="200" height="150"/>   </a></BR>
<a href="Ri.jpg"><img src="Re3.jpg" width="200" height="150"/></a></BR>
<a href="Ri4.jpg"><img src="e4.jpg" width="200" height="150"/></a></BR>
</p>
Run Code Online (Sandbox Code Playgroud)

和CSS代码

p.menusomething{background: white;
   margin: auto;
   margin-top: 200px;
   margin-left: 10px;
   padding: 10px;
   width: 200px;}
Run Code Online (Sandbox Code Playgroud)

Moh*_*lam 5

您定位的是图像容器,而不是图像本身。要解决此问题,只需将以下任意CSS行添加到文件中

p.menusomething a>img
{
   margin-top:20px; /*to have the space above the image*/
   margin-bottom:20px; /*to have the space under the image*/
}
Run Code Online (Sandbox Code Playgroud)

仅其中之一可以胜任,请告诉我这是否是您所需要的。

请查看此Live演示以了解更多详细信息:http : //jsfiddle.net/3jApT/3/