显示的替代方法:Chrome中的内容? [英] Alternative for display:contents in Chrome?
本文介绍了显示的替代方法:Chrome中的内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在chrome中实现以下功能的替代解决方案是什么.
What is the alternate solution to implement the following in chrome.
display:contents;
当前只有Firefox支持所有版本.
Currently only firefox supports them in all versions.
还有没有其他方法可以获得与此css标签相同的功能.
Is there any other way to get the same features as this css tag.
推荐答案
您可以使用另一种方法,而不是使用display:content(此刻被标记为实验性),您可以创建一个容器类并添加属性 display:grid
,并且在浏览器支持 display:content
的情况下,将其与以下代码一起使用:
You can use an alternative approach, instead using display:content (that is marked as experimental at the moment) you can create a container class and add the property display:grid
, and, in case the browser supports display:content
use it with this code:
@supports (display: contents) {
article { display: contents; }
}
这篇关于显示的替代方法:Chrome中的内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文