- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="utf-8">
<title>Направление главной оси и внешние отступы</title>
<link href="course.css" rel="stylesheet">
<link href="style.css" rel="stylesheet">
</head>
<body class="world">
<div class="spot">
<div class="skate skate-1 racoon-green"></div>
<div class="skate skate-2 racoon-brown"></div>
<div class="skate skate-3 racoon-orange"></div>
</div>
</body>
</html>
CSS
.spot {
display: flex;
align-items: stretch;
justify-content: space-around;
}
.skate {
margin: 10px;
min-width: 50px;
min-height: 50px;
}
.skate-2 {
margin-top: auto;
}
.skate-3 {
align-self: flex-end;
margin-bottom: auto;
}
Вы перешли на другую страницу
ЗадачиВыполнено
0
- Измените у
.spot
направление главной оси наcolumn
. - Затем у второго скейта удалите свойство
margin-top
и добавьте свойствоmargin-left: auto;
. - У третьего скейта удалите свойство
margin-bottom
и добавьте свойствоmargin-right: auto;
.