Margin-Top不适用于span元素吗? - Margin-Top not working for span element?

10/14 15:06
阅读数 0

问题:

Can someone tell me what I coded wrong?有人可以告诉我我写错了什么吗? Everything is working, the only thing is that there is no margin at the top.一切正常,唯一的事情是顶部没有边距。

HTML : HTML

<div id="contact_us"> <!-- BEGIN CONTACT US -->
  <span class="first_title">Contact</span>
  <span class="second_title">Us</span>
  <p class="content">For any questions whatsoever please contact us through the following e-mail address:</p></br></br>
  <p class="e-mail">info@e-mail.com</p></br></br></br></br>
  <p class="read_more"><a href="underconstruction.html">Read More</a></p>
</div> <!-- END CONTACT US -->

CSS : CSS

span.first_title {
  margin-top: 20px;
  margin-left: 12px;
  font-weight: bold;
  font-size: 24px;
  color: #221461;
}

span.second_title {
  margin-top: 20px;
  font-weight: bold;
  font-size: 24px;
  color: #b8b2d4;
}   

解决方案:

参考一: https://en.stackoom.com/question/n5xZ
参考二: https://stackoom.com/question/n5xZ
展开阅读全文
打赏
0
0 收藏
分享
加载中
更多评论
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部