【发布时间】:2022-01-17 21:46:32
【问题描述】:
我想将文本标签右对齐使用引导程序 5 就像我输入这段代码一样:
<div class="form-floating text-dark text-end float-right">
<input type="password" class="form-control text-dark" placeholder=" " id="password">
<label for="floatingInput" class="float-right text-end">كلمة المرور</label>
</div>
文本从左开始 我想把它改成右边
我试过.text-end
并输入css代码
.float-right {
float: right;
}
但这对我不起作用
【问题讨论】:
-
HTML 标记中的
class="float-right"在哪里? -
我尝试将它与输入 div 一起使用,但不起作用,我尝试与标签一起使用,但不起作用
-
你做错了什么。在您尝试过但不适合您的地方添加代码 sn-p。
-
@pavel 我会编辑这个问题,你可以显示
-
@pavel 已修改
标签: css bootstrap-5