Свойство flex-shrink
- 1
- 2
- 3
Исходный код этого примера:
<style>
ul.flex {
display: flex;
justify-content: space-around;
background: yellowgreen;
padding: 0;
margin: 0;
list-style: none;
}
li.flex {
display: inline-block;
flex-basis: 300px;
background: tomato;
height: 50px;
margin: 10px;
line-height: 50px;
color: white;
font-weight: bold;
font-size: 2rem;
text-align: center;
}
</style>
<ul class="flex">
<li class="flex" style="flex-shrink: 1;">1</li>
<li class="flex" style="flex-shrink: 2;">2</li>
<li class="flex" style="flex-shrink: 1;">3</li>
</ul>
.
Прокомментировать/Отблагодарить