.grid {
display: grid;
grid-template-columns: repeat(8, minmax(0, 1fr));
gap: 20px;
}
.grid > * {
grid-column: span 3; /* по умолчанию все широкие */
}
.grid > :nth-child(9n + 3),
.grid > :nth-child(9n + 4),
.grid > :nth-child(9n + 8) {
grid-column: span 2; /* узкие элементы */
}
:root {
--transition-duration: 2s;
--animation-duration: 5s;
}
div {
width: 100px;
height: 100px;
background: red;
opacity: 0;
transition: opacity var(--transition-duration);
will-change: transform, opacity;
}
div:hover {
animation: mymove var(--animation-duration) var(--transition-duration)
infinite;
opacity: 1;
}
@keyframes mymove {
to {
transform: translateX(200px);
}
}
justify-content: space-between
и gap
одновременно?label:has(+ .field-error) {
border: 2px solid red;
}
Если просто вставить SVG на страницу и не задавать ему никакие размеры, он отобразится размером 300px на 150px, что не поместилось — обрежется
<svg width="18" height="19"><use xlink:href="#exit"></use></svg>