问题
What is the alternate solution to implement the following in chrome.
display:contents;
Currently only firefox supports them in all versions.
Is there any other way to get the same features as this css tag.
回答1:
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; }
}
来源:https://stackoverflow.com/questions/48535296/alternative-for-displaycontents-in-chrome