Программисты Html
Anonymous
Странивые стержни не зависят
Сообщение
Anonymous » 30 май 2025, 17:55
Я делаю эффект падения для страниц для моего веб -сайта портфеля. Все остальное работает, но зависание нет. Я добавил UL и использовал Li, как обычно, но он не работал.
Код: Выделить всё
.container {
padding: 10px 10%;
}
nav {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
}
nav ul li {
display: inline-block;
list-style: none;
margin: 10px 20px;
}
nav ul li a {
color: #fff;
text-decoration: none;
font-size: 18px;
position: relative;
}
nav ul li a::after {
content: '';
width: 100%;
height: 3px;
background: #ff004f;
position: absolute;
left: 0;
bottom: -6px;
transition: 0.5s;
}
nav ul li a:hover::after {
width: 100%;
}< /code>
[img]logo.png[/img]
[list]
[*][url=#]Home[/url]
[*][url=#]About[/url]
[*][url=#]Services[/url]
[*][url=#]Portfolio[/url]
[*][url=#]Contact[/url]
[/list]
Подробнее здесь:
https://stackoverflow.com/questions/757 ... t-hovering
1748616918
Anonymous
Я делаю эффект падения для страниц для моего веб -сайта портфеля. Все остальное работает, но зависание нет. Я добавил UL и использовал Li, как обычно, но он не работал.[code].container { padding: 10px 10%; } nav { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; } nav ul li { display: inline-block; list-style: none; margin: 10px 20px; } nav ul li a { color: #fff; text-decoration: none; font-size: 18px; position: relative; } nav ul li a::after { content: ''; width: 100%; height: 3px; background: #ff004f; position: absolute; left: 0; bottom: -6px; transition: 0.5s; } nav ul li a:hover::after { width: 100%; }< /code> [img]logo.png[/img] [list] [*][url=#]Home[/url] [*][url=#]About[/url] [*][url=#]Services[/url] [*][url=#]Portfolio[/url] [*][url=#]Contact[/url] [/list] [/code] Подробнее здесь: [url]https://stackoverflow.com/questions/75779965/page-bars-not-hovering[/url]