Навигационный слайдер
Сделай меню из трёх пунктов: при наведении пункт плавно расширяется.
Показать ответ (сначала попробуй сам!)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Навбар</title>
<style>
body {
display: flex;
justify-content: flex-start;
align-items: center;
height: 100vh;
background-color: #78a8bc;
overflow: hidden;
margin: 0;
}
.navbar {
height: 100%;
display: flex;
flex-direction: column;
}
.item-1, .item-2, .item-3 {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
color: cornsilk;
font-weight: bold;
font-size: 2em;
padding: .75em;
width: 100%;
transition: all ease .5s;
}
.item-1:hover, .item-2:hover, .item-3:hover {
width: 200%;
}
.item-1 {
background-color: #131e1d;
}
.item-2 {
background-color: #974c18;
}
.item-3 {
background-color: #ddb067;
}
</style>
</head>
<body>
<div class="navbar">
<div class="item-1">
Новости
</div>
<div class="item-2">
Картинки
</div>
<div class="item-3">
Информация
</div>
</div>
</body>
</html>