我目前正在一个小网站上工作,现在我遇到了一些问题。我的css真的很糟糕,我几乎没有线索怎么做。表CSS样式(布局)
在本网站的右侧站点。
http://s526367159.online.de/reclaim/website/home-one-page/
你可以看到在它的一些图片框。那看起来不太好。我脑海中最简单的解决方案是添加一个在photoshop中创建的.png图片,但是我想用.css来做,因为我花了很多时间让这些东西工作。
我现在的问题是,是否可以添加边框,并使小图片彼此间隔一点点,而不会为每个“”添加大量代码?
这是基本的代码。
<style type="text/css">
.tg {border-collapse:collapse;border-spacing:0;margin:0px auto;}
.tg td{border-style:solid;border-color:#2a1c14;border-width:1px;overflow:hidden;}
</style>
<table class="tg">
<tr>
<td class="tg-031e"><img src="http://s526367159.online.de/reclaim/website/wp-content/uploads/2014/07/IMAG0587.jpg" width="42" height="42" /></a></td>
<td class="tg-031e"><img src="http://s526367159.online.de/reclaim/website/wp-content/uploads/2014/10/dk_blut_grau.jpg" width="32" height="32" /><img src="http://s526367159.online.de/reclaim/website/wp-content/uploads/2014/10/dk_frost_grau.jpg" width="32" height="32" /><img src="http://s526367159.online.de/reclaim/website/wp-content/uploads/2014/10/dk_unheilig_grau.jpg" width="32" height="32" /></td>
</tr>
<tr>
<td class="tg-031e"><img src="http://s526367159.online.de/reclaim/website/wp-content/uploads/2014/07/druide.jpg" width="42" height="42" /></a></td>
<td class="tg-031e"><img src="http://s526367159.online.de/reclaim/website/wp-content/uploads/2014/10/druide_w%C3%A4chter_grau.jpg" width="32" height="32" /><img src="http://s526367159.online.de/reclaim/website/wp-content/uploads/2014/10/druide_feral_grau.jpg" width="32" height="32" /><img src="http://s526367159.online.de/reclaim/website/wp-content/uploads/2014/10/druide_eule_grau.jpg" width="32" height="32" /><img src="http://s526367159.online.de/reclaim/website/wp-content/uploads/2014/10/druide_baum_grau.jpg" width="32" height="32" /></td>
</tr>
</table>
会真的很感谢这里的一些帮助。
好,会给你一个赞成票,但..即时通讯无法>。<。没想到将一个“全局”规则附加到像img标签这样的东西上很容易。非常感谢! – 2014-10-09 22:17:36