我想要显示四个图像 - 第一行有两个,下面有两个。
由于某些原因,只有顶行显示,我只是看不清楚原因。
这是非常简单的代码:
<img class="social" src="http://www.c5d.co.uk/racenight.png" alt="Race Night">
<img class="social2" src="http://www.c5d.co.uk/mothersday.png" alt="Mothers' Day>
<p>
<img class="social" src="http://www.c5d.co.uk/carlosax.png" alt="Carlo Sax>
<img class="social2" src="http://www.c5d.co.uk/eastersunday.png" alt="Easter Sunday"></p>
网页为:http://www.c5d.co.uk/socialeventsfour.php
为什么不显示下面的两个图像?
答案 0 :(得分:1)
因为您忘记关闭第二个和第三个"Mothers' Day
上的"Carlo Sax
和<img>
以下是更正后的内容:
<img class="social" src="http://www.c5d.co.uk/racenight.png" alt="Race Night">
<img class="social2" src="http://www.c5d.co.uk/mothersday.png" alt="Mothers' Day">
<p>
<img class="social" src="http://www.c5d.co.uk/carlosax.png" alt="Carlo Sax">
<img class="social2" src="http://www.c5d.co.uk/eastersunday.png" alt="Easter Sunday">
</p>
答案 1 :(得分:1)
<img class="social" src="http://www.c5d.co.uk/racenight.png" alt="Race Night" />
<img class="social2" src="http://www.c5d.co.uk/mothersday.png" alt="Mothers' Day" />
<p>
<img class="social" src="http://www.c5d.co.uk/carlosax.png" alt="Carlo Sax" />
<img class="social2" src="http://www.c5d.co.uk/eastersunday.png" alt="Easter Sunday" />
</p>
使用图片时可以使用/>
(img
)。以及"
属性中明显丢失的alt
。