css – bootstrap 4 pull-xs-right无法按预期工作

前端之家收集整理的这篇文章主要介绍了css – bootstrap 4 pull-xs-right无法按预期工作前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我有这个html使用 bootstrap 4 utilities将按钮拉到屏幕右侧.它确实这样做了.

但是,按钮不会按预期方式下推其下方的内容.它们最终叠加在下面的内容之上.

如果我不使用pull-xs-right,那么按钮会保持对齐,但是它们会推动下面的项目.

我需要申请其他课程吗?

@H_502_8@<div class="pull-xs-right"> <button click.delegate="saveEdit()" type="submit" class="k-button k-primary"> Save </button> <button click.delegate="cancel()" class="k-button"> Cancel </button> </div>

解决方法

在Bootstrap 4 .float- {sm,md,lg,xl} – {left,right,none}类中为响应浮点数添加了类,并替换了.pull-left和.pull-right.

这意味着:

.pull-right被.float-right取代

.pull-left被.float-left取代

.pull-xs-right是错误的,将.pull替换为.float拉和右之间的xs表示超小,这决定了元素的大小.以下是更改元素大小的选项:{xs,sm,xl}其中xs = extra small,sm = small,md = medium,lg = large和xl = extra large

见:https://v4-alpha.getbootstrap.com/migration/

原文链接:https://www.f2er.com/css/217601.html

猜你在找的CSS相关文章