Rit*_*man 21 twitter-bootstrap bootstrap-5
这是 bootstrap 5 navbar ul 部分代码。我的问题是:
我无法从左到右更改 ul 位置。
bootstrap 5类“me-auto”的含义是什么
家小智 13
mr-auto => bootstrap 4 边距右自动
me-auto => bootstrap 5 边距 end-auto
https://getbootstrap.com/docs/5.0/utilities/spacing/#margin-and-padding
me-auto 的意思是“保证金结束自动”。这实际上是:
margin-right: auto
Run Code Online (Sandbox Code Playgroud)
me = 右边距,ms = 左边距
要验证我的答案,您可以在此处下载 bootstrap 5.0: https: //getbootstrap.com/docs/5.0/getting-started/download/
打开 css/bootstrap.css 文件,然后搜索这个 className(me-auto),你会在那里找到它的 css 代码。
这是在 Bootstrap 5 中设置间距的最佳方式,对于 LTR 和 RTL 书写系统都很友好。
me代表margin-end。me-autoLTR 中相当于mr-autoBootstrap 4 及之前的版本。Bootstrap 5 中的间距类使用以下格式命名:
{property}{sides}-{size}对于xs,{property}{sides}-{breakpoint}-{size}适用于 sm、md、lg、xl 和 xxl。其中财产是以下之一:
其中 side 是以下之一:
其中大小是以下之一:
https://getbootstrap.com/docs/5.0/utilities/spacing/#margin-and-padding
小智 0
float:right或者你可以使用这个CSS:
.lefttoright {
position: relative;
right: 5px;
}
Run Code Online (Sandbox Code Playgroud)
me-auto将两个项目推到右侧。| 归档时间: |
|
| 查看次数: |
62142 次 |
| 最近记录: |