bootstrap 4 pull-xs-right无法正常工作 [英] bootstrap 4 pull-xs-right not working as expected
问题描述
我使用html使用 bootstrap 4实用程序将按钮向右拉屏幕的.它确实做到了.
I have this html using bootstrap 4 utilities to pull the buttons to the right of the screen. And it does do this.
但是,按钮并没有按预期的那样将其下方的内容下推.它们最终被叠加在下面的内容之上.
However, the buttons do not push down the content below it as expected. They end up overlayed on top of the content below.
如果我不使用pull-xs-right
,则按钮将保持左对齐,但是它们确实会推动下面的项目.
If I do not use pull-xs-right
then the buttons are left aligned, but they do push the items below.
我还需要再申请其他课程吗?
Is there some other class I need to apply?
<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
.
In Bootstrap 4 .float-{sm,md,lg,xl}-{left,right,none}
classes were added for responsive floats, and replaced .pull-left
and .pull-right
.
这意味着:
.pull-right
替换为.float-right
.pull-left
替换为.float-left
.pull-xs-right
是错误的,将.pull
替换为.float
,在pull和right之间的xs
代表较小的尺寸,它确定了元素的大小.以下是更改元素大小的选项:{xs,sm,md,lg,xl}
,其中xs
=较小,sm
=较小,md
=中,lg
=较大,xl
=较大
.pull-xs-right
is wrong, replace .pull
by .float
the xs
between pull and right stands for extra small which determines the size of the element. The following are the options to change the element size: {xs,sm,md,lg,xl}
where xs
= extra small, sm
= small, md
= medium, lg
= large and xl
= extra large
请参阅: https://v4-alpha.getbootstrap.com/migration/
这篇关于bootstrap 4 pull-xs-right无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!