Heim  >  Artikel  >  Web-Frontend  >  怎么将图片水平排列,并且图片间有间距,用float浮动之后就无法设置间距了。_html/css_WEB-ITnose

怎么将图片水平排列,并且图片间有间距,用float浮动之后就无法设置间距了。_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:41:382788Durchsuche

<table border="1" width="950" height="250" cellspacing="0" cellpadding="0"><tr style="height:50px;"><td style="border-bottom:1px solid #ffffff;width:200px;font-size:15px;text-align:center;color:#f60;">特别推荐</td><td style="background-color:#dddddd;"></td></tr><tr><td colspan="2"> <img  src="__PUBLIC__/img/01.jpg"    style="max-width:90%"  style="max-width:90%"/ alt="怎么将图片水平排列,并且图片间有间距,用float浮动之后就无法设置间距了。_html/css_WEB-ITnose" ><img  src="__PUBLIC__/img/02.jpg"    style="max-width:90%"  style="max-width:90%"/ alt="怎么将图片水平排列,并且图片间有间距,用float浮动之后就无法设置间距了。_html/css_WEB-ITnose" ><img  src="__PUBLIC__/img/03.jpg"    style="max-width:90%"  style="max-width:90%"/ alt="怎么将图片水平排列,并且图片间有间距,用float浮动之后就无法设置间距了。_html/css_WEB-ITnose" ><img  src="__PUBLIC__/img/04.jpg"    style="max-width:90%"  style="max-width:90%"/ alt="怎么将图片水平排列,并且图片间有间距,用float浮动之后就无法设置间距了。_html/css_WEB-ITnose" ><img  src="__PUBLIC__/img/05.jpg"    style="max-width:90%"  style="max-width:90%"/ alt="怎么将图片水平排列,并且图片间有间距,用float浮动之后就无法设置间距了。_html/css_WEB-ITnose" ></td></tr></table>


回复讨论(解决方案)

用margin不行吗

margin或者padding就可以吧

用margin不行吗

每张图片都设置margin,那图片要是从数据库中取哪怎么办?

用margin不行吗

每张图片都设置margin,那图片要是从数据库中取哪怎么办?

样式不要写到标签里

样式不要写到标签里

要给每张图片设置不同的margin值,不写标签里怎么行呢。


样式不要写到标签里

要给每张图片设置不同的margin值,不写标签里怎么行呢。

图片怎么保存 margin就可以怎么保存
但是关键问题在于
为什么是不同的margin值呢

要给每张图片设置不同的margin值,不写标签里怎么行呢。


不然将 margin的值也从数据库取出。。。
其实我也觉得好奇,,为啥会有不同margin
Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn