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

Gre*_*Gum 21 css bootstrap-4

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

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

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

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

       <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>
Run Code Online (Sandbox Code Playgroud)

小智 46

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

这意味着:

.pull-right 被...取代 .float-right

.pull-left 被...取代 .float-left

.pull-xs-right是错误的,取代.pull通过.floatxs拉之间,右代表的超小型这就决定了元素的大小.以下是更改元素大小的选项:{xs,sm,md,lg,xl}where xs= extra small,sm= small,md= medium,lg= large和xl= extra large

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

  • 在https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css中没有`float-xs-right`但是从`sm`开始,比如`float-sm -right` (8认同)
  • 谢谢!我已经失去了2小时的生命...下次我会更快地寻找迁移文档...... (2认同)