简体   繁体   English

无效的属性名称:flex-basis:1 0 max-content

[英]Invalid property name: flex-basis: 1 0 max-content

I'm applying the flex property to to a number of divs on the page, and viewed in Chrome get the following: 我将flex属性应用于页面上的多个div,并在Chrome中查看了以下内容:

最大内容失败

The message on hover is Invalid property name . 悬停消息是Invalid property name

For what it's worth, my code is as follows: 对于它的价值,我的代码如下:

.class-name {
  flex: 1 0 max-content;
}

I thought max-content was supported in Chrome so am unsure why this would be the case? 我以为Chrome支持 max-content 所以不确定为什么会这样吗? My browser's up to date and I get the same problem if I pull this into flex-basis . 我的浏览器是最新的,如果将其放入flex-basis则会遇到相同的问题。

Any explanations or suggestions greatly appreciated, even (especially) if I'm missing something dead simple :) 任何解释或建议都将不胜感激,甚至(尤其是)如果我缺少一些简单的东西:)

根据MDN上的浏览器兼容性图表, flex-basismax-content关键字仍处于试验阶段,与Chrome不兼容

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM