html - 如何在 HTML 中的两个内联按钮 (BTN) 之间添加边距间距

标签 html css

我是一名正在学习 HTML 和 CSS 的新编码员。

我已将两个 BTN 编码到我的 HTML 元素中,但它们内联在一起,看起来很愚蠢。

如何在它们之间添加边距,以便美观。

enter image description here

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/

相关文章:

javascript - 如何制作响应式图像?

css - 调整窗口大小时,背景颜色会出现幻影边框

html - 如何使 slider 箭头更高

css - 如何在任何 dom 元素之后选择第二个 div?

html - 如何将页脚设置到页面底部?

html - 图像居中的水平尺

css - 链接到多个 css 文件有效,但组合成一个文件会破坏 css

html - Z 索引 : Internet Explorer (Z Ordering)

javascript - 如何使用 Javascript 查找带命名空间的 HTML 元素

javascript - 如何在具有交互式内容的动态创建的 div 上添加事件监听器