我是一名正在学习 HTML 和 CSS 的新编码员。
我已将两个 BTN 编码到我的 HTML 元素中,但它们内联在一起,看起来很愚蠢。
如何在它们之间添加边距,以便美观。
My HTML
<div class="jumbotron">
<h1>Boutique Recruitment Solutions</h1>
<p class="lead">We are an indapendant recruitment company specialising in providing bespoke HR services.<br> We take the time to understand our clients vision, goals and culture allowing us to engage with the right talent to fill the vacany.</p>
<p><a class="btn btn-primary btn-lg" role="button">Submit Your CV</a><a class="btn btn-primary btn-lg" role="button">Fill A Vacancy</a></p>
</div>
最佳答案
您认为为什么 margin 不起作用?
a.btn {
margin: 0 1em;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" />
<div class="jumbotron">
<h1>Boutique Recruitment Solutions</h1>
<p class="lead">We are an indapendant recruitment company specialising in providing bespoke HR services.
<br>We take the time to understand our clients vision, goals and culture allowing us to engage with the right talent to fill the vacany.</p>
<p><a class="btn btn-primary btn-lg" role="button">Submit Your CV</a><a class="btn btn-primary btn-lg" role="button">Fill A Vacancy</a>
</p>
</div>
关于html - 如何在 HTML 中的两个内联按钮 (BTN) 之间添加边距间距,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35412653/