Я делаю это так: < /p>
Код: Выделить всё
.block{
font-family: 'Roboto Mono', monospace;
display: flex;
}
.tile{aspect-ratio: 1 / 1;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
width: 100px;
color: white;
font-size: 12px;
background: linear-gradient(to right, var(--from) 0%, var(--from) 50%, var(--to) 100%);
}
.tile:not(:last-child) {
border-right: solid 1px black;
}< /code>
01
02
03
04
05
06
07
08
09
10
11
12
13
Легко увидеть на плите 01 и 08 То, как все должно вести себя: около 50%. Градиент начинается с 80% или 90%?>
Подробнее здесь: https://stackoverflow.com/questions/796 ... not-linear
Мобильная версия