解决方法
使用media-breakpoint-mixin分配.btn .btn-sm大小调整…
/* change all .btn to .btn-sm size on xs */ @include media-breakpoint-between(xs,sm){ .btn { @include button-size($btn-padding-y-sm,$btn-padding-x-sm,$font-size-sm,$btn-border-radius-sm); } }
https://www.codeply.com/go/FoEUO7XCDU
更新 – Bootstrap 4 Beta
这个按钮大小的mixin略有变化:
@include media-breakpoint-between(xs,sm){ .btn { @include button-size($input-btn-padding-y-sm,$input-btn-padding-x-sm,$line-height-sm,$btn-border-radius-sm); } }