bootstrap 4 pull-xs-right not working as expected

前端 未结 2 1211
悲哀的现实
悲哀的现实 2020-12-17 09:12

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

相关标签:
2条回答
  • 2020-12-17 09:29

    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/

    0 讨论(0)
  • 2020-12-17 09:46

    As mentioned above float replaces pull. So .float-right replaces .pull-right and .float-left replaces .pull-right. You can add -{sm,md,lg,xl} for different breakpoints for example .float-md-right will break on medium-sized screens. If you leave off the size then it will not break and will always float in the direction indicated.

    0 讨论(0)
提交回复
热议问题