【发布时间】:2022-01-21 14:19:48
【问题描述】:
我正在使用 Bootstrap 5,我试图在导航栏折叠时左对齐导航栏社交图标(适用于小型/移动设备),但在大屏幕上查看时右对齐。
您能否帮助确定要设置样式的选择器?同样,我只希望在导航栏折叠时图标左对齐。
我的导航栏示例在这里:https://www.codeply.com/p/4zgJqBtILT
谢谢!
【问题讨论】:
标签: html css twitter-bootstrap navbar bootstrap-5
我正在使用 Bootstrap 5,我试图在导航栏折叠时左对齐导航栏社交图标(适用于小型/移动设备),但在大屏幕上查看时右对齐。
您能否帮助确定要设置样式的选择器?同样,我只希望在导航栏折叠时图标左对齐。
我的导航栏示例在这里:https://www.codeply.com/p/4zgJqBtILT
谢谢!
【问题讨论】:
标签: html css twitter-bootstrap navbar bootstrap-5
添加到 UL 标记 justify-content-start justify-content-lg-end 并将 float-sm-end 类更改为 float-xl-end
<ul class=" col-md-4 col-sm list-unstyled justify-content-start justify-contentxl-end d-flex float-xl-end">
【讨论】:
<ul class="col-md-4 col-sm list-unstyled justify-content-start justify-content-lg-end d-flex float-xl-end">