“menghasilkan kisi acak di CSS” Kode Jawaban

menghasilkan kisi acak di CSS

.wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    grid-gap: 10px;
    grid-auto-flow: dense;
    list-style: none;
    margin: 1em auto;
    padding: 0;
    max-width: 800px;
}
.wrapper li {
    border: 1px solid #ccc;
}
.wrapper li.landscape {
    grid-column-end: span 2;
}
.wrapper li img {
   display: block;
   object-fit: cover;
   width: 100%;
   height: 100%;
}
Thoughtless Tiger

menghasilkan kisi acak di CSS

<ul class="wrapper">
   <li><img src="https://placehold.it/200x300" alt="placeholder"></li>
   <li class="landscape"><img src="https://placehold.it/350x200" alt="placeholder"></li>
   <li class="landscape"><img src="https://placehold.it/350x200" alt="placeholder"></li>
   <li class="landscape"><img src="https://placehold.it/350x200" alt="placeholder"></li>
   <li><img src="https://placehold.it/200x300" alt="placeholder"></li>
   <li><img src="https://placehold.it/200x300" alt="placeholder"></li>
   <li class="landscape"><img src="https://placehold.it/350x200" alt="placeholder"></li>
   <li><img src="https://placehold.it/200x300" alt="placeholder"></li>
   <li><img src="https://placehold.it/200x300" alt="placeholder"></li>
   <li><img src="https://placehold.it/200x300" alt="placeholder"></li>
</ul>
Thoughtless Tiger

Jawaban yang mirip dengan “menghasilkan kisi acak di CSS”

Pertanyaan yang mirip dengan “menghasilkan kisi acak di CSS”

Lebih banyak jawaban terkait untuk “menghasilkan kisi acak di CSS” di CSS

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya