Как я могу сделать свой переход оставаться на активной ссылке?Html

Программисты Html
Anonymous
Как я могу сделать свой переход оставаться на активной ссылке?

Сообщение Anonymous »

Я хочу иметь анимацию линии над моим «Ли» в моем меню, и у меня есть, но тогда я хочу, чтобы анимация оставалась на активной ссылке. < /p>

my code: < /p>

.menu ul li:before {
content: "";
display: block;
width: 0%;
color: #f7f7f7;
border-top: 1px solid transparent;
border-image-slice: 1;
transition: width .5s ease-in-out 0s;
margin-bottom: 5px;
}
.menu ul li:focus:before,
.menu ul li:hover:before {
color: #f7f7f7;
border-top: 1px solid transparent;
border-image: linear-gradient(to right, #529ecc , #9CF5A6);
border-image-slice: 1;
width: 100%;
< /code>

Редактировать: я добавил..menu ul li.active {
color: #f7f7f7;
border-top: 1px solid transparent;
border-image: linear-gradient(to right, #529ecc , #9CF5A6);
border-image-slice: 1;
margin-bottom: 5px;


Подробнее здесь: https://stackoverflow.com/questions/435 ... ctive-link

Вернуться в «Html»