Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/82.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/40.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 角度项目中的水平居中引导4按钮工具栏_Html_Css_Angular_Bootstrap 4_Centering - Fatal编程技术网

Html 角度项目中的水平居中引导4按钮工具栏

Html 角度项目中的水平居中引导4按钮工具栏,html,css,angular,bootstrap-4,centering,Html,Css,Angular,Bootstrap 4,Centering,我所要做的就是将dang按钮工具栏水平居中。到目前为止,我只知道: <div class="row"> <div class="col-sm-6 mx-auto"> <div class="btn-toolbar" role="toolbar" aria-label="Toolbar with button groups"> <div class="btn-group mr-2" role="group" aria-label="

我所要做的就是将dang按钮工具栏水平居中。到目前为止,我只知道:

<div class="row">
  <div class="col-sm-6 mx-auto">
    <div class="btn-toolbar" role="toolbar" aria-label="Toolbar with button groups">
      <div class="btn-group mr-2" role="group" aria-label="First group">
        <button type="button" class="btn btn-secondary">Sign Up</button>
      </div>
      <div class="btn-group mr-2" role="group" aria-label="Second group">
        <button type="button" class="btn btn-secondary">Forgot Password?</button>
      </div>
    </div>
  </div>
</div>

注册
忘记密码了?
附件是它的外观图片。似乎应该有一些boostrap类我可以添加使其工作。

您尝试过:

<div class="row justify-content-center">
    .
    .
    .
</div>

.
.
.
根据您的需要,您可以在此处查看几种对齐内容的方法:

您是否尝试过:

<div class="row justify-content-center">
    .
    .
    .
</div>

.
.
.

根据您的需要,您可以在此处查看几种对齐内容的方法:

您可以将此CSS规则应用于
btn工具栏

.btn-toolbar{
    text-align: center !important;
    display: Block !important;
}
.btn工具栏{
文本对齐:居中!重要;
显示:块!重要;
}

注册
忘记密码了?

您可以将此CSS规则应用于
btn工具栏

.btn-toolbar{
    text-align: center !important;
    display: Block !important;
}
.btn工具栏{
文本对齐:居中!重要;
显示:块!重要;
}

注册
忘记密码了?

您是否尝试过使用引导中的偏移量类?您也可以通过css轻松完成这一点。偏移量示例:您是否尝试过使用引导中的偏移量类?您也可以通过css轻松完成这一点。抵销示例: