Bootstrap 4中的.pull-left和.pull-right类发生了什么? [英] What happened to the .pull-left and .pull-right classes in Bootstrap 4?

查看:171
本文介绍了Bootstrap 4中的.pull-left和.pull-right类发生了什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在最新版本中,左拉和右拉已由.pull- {xs,sm,md,lg,xl}-{left,right,none}

In the newest version the pull-left and pull-right have been replaced by .pull-{xs,sm,md,lg,xl}-{left,right,none}

这意味着我不再需要编写简单的class="pull-right",而是现在要编写class="pull-md-right pull-xl-right pull-lg-right pull-sm-right pull-xs-right"

That means that instead of writing a simple class="pull-right", I will have now to write class="pull-md-right pull-xl-right pull-lg-right pull-sm-right pull-xs-right"

有没有那么乏味的方法呢?

Is there a less tedious way to do it?

推荐答案

早在2016年最初提出此问题时,答案是:

Back in 2016 when this question was originally asked, the answer was:

$('.pull-right').addClass('pull-xs-right').removeClass('pull-right')

但是现在可以接受的答案应该是罗伯特·温特的.

But now the accepted answer should be Robert Went's.

这篇关于Bootstrap 4中的.pull-left和.pull-right类发生了什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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