我可能遗漏了一些非常简单的东西,但我无法发现我的错误
本质上,我正在为一个新的网络应用程序创建一个模板,使用 LESS 作为样式表。在 Chrome、Opera 和 Safari 中,line-height 工作得很好,但在 Firefox 中,它不呈现。简而言之,这是我得到的代码
无模板
@content-header-height: calc(@content-header-font-size * 3);
@content-header-line-height: calc(@content-header-font-size * 3 - 1px);
.header {
height: @content-header-height;
line-height: @content-header-line-height;
}
显然还有更多的属性,但这些是相关的。在 Firefox 中,行高属性甚至不会出现。
最佳答案
你真的需要 calc
吗?尝试删除它。
关于css - Firefox 不从 .less 文件渲染行高,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28641407/