CSS网格布局即使带有前缀也不能在IE11中工作
<section class="grid"> <article class="grid-item width-2x height-2x">....</article> <article class="grid-item">....</article> <article class="grid-item">....</article> <article class="grid-item width-2x">....</article> <article class="grid-item height-2x">....</article> <article class="grid-item">....</article> <article class="grid-item">....</article> <article class="grid-item width-2x height-2x">....</article></section>
.grid { display: grid; grid-template-columns: repeat( 4, 1fr ); grid-gap: 30px; align-items: start; .grid-item { &.height-2x { grid-row: span 2; } &.width-2x { grid-column: span 2; } }}
-ms
-ms
.grid { display: -ms-grid; display: grid; -ms-grid-columns: (1fr)[4]; grid-template-columns: repeat(4, 1fr); -ms-grid-rows: (270px)[4]; grid-template-rows: repeat(4, 270px); grid-gap: 30px;}.grid .grid-item { background-color: #000; color: #fff; text-align: center; line-height: 270px;}.grid .grid-item.height-2x { -ms-grid-row: span 2; grid-row: span 2;}.grid .grid-item.width-2x { -ms-grid-column: span 2; grid-column: span 2;}
<section class="grid"> <article class="grid-item width-2x height-2x">....</article> <article class="grid-item">....</article> <article class="grid-item">....</article> <article class="grid-item width-2x">....</article> <article class="grid-item height-2x">....</article> <article class="grid-item">....</article> <article class="grid-item">....</article> <article class="grid-item width-2x height-2x">....</article></section>
繁星淼淼