问题
I've setup a css grid with 3 columns to display our portfolio. I found a working code for Firefox and Internet Explorer and Safari. However on Chrome it doesn't show my grid at all, all the pictures are below each other. See the website: http://www.ddw-sanitair.be
Additionally it does not accept the 'display: none' class on some of the pictures, hence the double/triple images ...
Any suggestions?
I tried to add grid-auto-rows: 270px; as suggested in another thread. I tried adding grid-template-rows: repeat(3, 1fr); as suggested in another thread.
But this didn't change anything in Chrome ...
.portfolio-group {
position: relative;
display:grid;
align-items: start;
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
grid-auto-rows: 270px;
Expected result = a nice reactive grid with 3 columns and 3 rows (in browser view).
回答1:
i hope you will get the ans from this site: `https://rachelandrew.co.uk/archives/2014/06/27/css-grid-layout-getting-to-grips-with-the-chrome-implementation/
来源:https://stackoverflow.com/questions/57830435/why-is-my-css-grid-not-working-in-chrome-works-in-all-other-browsers