Obrátenie stĺpca s flex elementmi v CSS
Nastavme teraz vo vlastnosti flex-direction hodnotu column-reverse.
V tomto prípade sa stĺpec obráti
- elementy budú pritlačené dole. Pritom
prvý element bude najnižšie:
html<div class="parent">
<div class="child">1</div>
<div class="child">2</div>
<div class="child">3</div>
</div>css.parent {
display: flex;
flex-direction: column-reverse;
width: 300px;
height: 200px;
border: 1px solid red;
}
.child {
width: 50px;
height: 50px;
border: 1px solid green;
}
Результат:
Задание 1
Zopakujte stránku podľa daného vzoru: