不兼容的单位:带有引导程序4 alpha 6的'rem'和'px' [英] Incompatible units: 'rem' and 'px' with bootstrap 4 alpha 6
本文介绍了不兼容的单位:带有引导程序4 alpha 6的'rem'和'px'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试实现bootstrap 4模板(我使用bootstrap 4 alpha 6),并看到这样的错误:
I am trying to implement a bootstrap 4 template (I use bootstrap 4 alpha 6) and see such an error:
Incompatible units: 'rem' and 'px'.
在线
$input-height: (($font-size-base * $input-btn-line-height) + ($input-btn-padding-y * 2)) !default;
有人遇到过类似的问题吗? 谢谢!
Did somebody experience similar issue? Thanks!
推荐答案
引导程序从版本3的像素(px)移至版本4的rem.
Bootstrap moved from pixels (px) in version 3 to rem in version 4.
在resources/assets/sass/_variables.scss
中替换:
$font-size-base: 14px;
与$font-size-base: 1rem;
通常,Bootstrap 4使用'rem'而不是'px'.作为参考,请查看 https://github.com/twbs/bootstrap/issues/17070
In general, Bootstrap 4 uses 'rem' instead of 'px'. For reference, look at https://github.com/twbs/bootstrap/issues/17070
这篇关于不兼容的单位:带有引导程序4 alpha 6的'rem'和'px'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文