【发布时间】:2012-07-26 16:09:34
【问题描述】:
以下代码将在图标之间产生不需要的空白。
<div>
<img src="icon1.png" />
<img src="icon2.png" />
</div>
我需要将图像标签保留在单行上,因为我的 .phtml 文件中有一些条件,它看起来像这样:
<div>
<?php if ($condition1) : ?>
<img src="icon1.png" />
<?php endif ?>
<?php if ($condition2) : ?>
<img src="icon2.png" />
<?php endif ?>
</div>
我不想将所有代码都放在一行中。这种情况有解决办法吗?
【问题讨论】:
标签: php html css whitespace