bootstrap 4 pull-xs-right 没有按预期工作 [英] bootstrap 4 pull-xs-right not working as expected

查看:11
本文介绍了bootstrap 4 pull-xs-right 没有按预期工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个 html 使用 bootstrap 4 实用程序 将按钮拉到右边屏幕的.它确实做到了这一点.

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

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

我还需要申请其他课程吗?

 

<button click.delegate="saveEdit()"类型=提交"class="k-button k-primary">保存<button click.delegate="cancel()"class="k-button">取消

解决方案

在 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 pull 之间的xsright 代表特小,它决定了元素的大小.以下是更改元素大小的选项: {xs,sm,md,lg,xl} 其中 xs = extra small, sm= 小,md = 中,lg = 大,xl = 特大

请参阅:https://v4-alpha.getbootstrap.com/migration/

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.

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>

解决方案

In Bootstrap 4 .float-{sm,md,lg,xl}-{left,right,none} classes were added for responsive floats, and replaced .pull-left and .pull-right.

That means:

.pull-right was replaced by .float-right

.pull-left was replaced by .float-left

.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

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

这篇关于bootstrap 4 pull-xs-right 没有按预期工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆