“vw” Chrome中的CSS单位无法正常工作 [英] "vw" CSS units in calc in Chrome not working
本文介绍了“vw” Chrome中的CSS单位无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
新的 vw
(和 vh
, vmin
和 vmax
)CSS单位非常有用,因为 calc
。两个在Chrome中工作正常(后者前缀为 -webkit-calc
),但由于某种原因,我发现 calc
属性值,包括 v *
单位,例如 width:-webkit-calc(95vw - 25em)
yield无效的属性值。
The new vw
(and vh
, vmin
and vmax
) CSS units are quite useful, as is calc
. Both work fine in Chrome (the latter prefixed as -webkit-calc
), but for some reason I've found that calc
property values including the v*
units, such as width: -webkit-calc(95vw - 25em)
yield an invalid property value. Is this just not implemented yet, or the spec, or a bug?
推荐答案
这是一个错误,注册为
It’s a bug, registered as Bug 94158 - calc isn't working with viewport units.
这篇关于“vw” Chrome中的CSS单位无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文