在div元素之间添加间距

时间:2018-04-23 19:09:57

标签: html image spacing

我想在这些div元素之间添加间距。 我怎么能这样做?

<div style="clear: left;">
  <p class="image"><img src="https://blog.proven.com/wp-content/uploads/zipsqaure.jpg" height="200" width="200" border="1px"></p>
  <p class="rating"><strong><font size="4">Proven Rating: <font color="#0077b3">★★★★★</font></font></strong></p>
  <p class="description">ZipRecruiter allows employers to post jobs within minutes and reach over 200 million active job seekers. </p>
</div>

<div style="clear: left;">
  <p class="image"><img src="https://blog.proven.com/wp-content/uploads/snag-1.png" height="200" width="200" border="1px"></p>
  <p class="rating"><strong><font size="4">Proven Rating: <font color="#0077b3">★★★★★</font></font></strong></p>
  <p class="description">Snagajob allows employers to reach over 80 million job seekers through their job board. It was founded in 1999 and continues to be one of the top job boards today, hosting one of the largest hourly employee networks on the web.</p>
</div>

1 个答案:

答案 0 :(得分:-2)

为每个元素定义边距或

使用类似这样的东西将它设置为div中的所有元素

div *{
    margin:10px;
}