Подробное описание и демонстрация работы эффекта наведения для ссылки под номером №8 для библиотеки Bootstrap. Html и CSS код для оформления ссылок на сайте как на изображении.
HTML разметка и CSS стили для оформления ссылок на сайте<a href="#" class="link">hover me</a>
.link{ display: inline-block; padding: 10px 20px; font-size: 20px; color: #5b5b5b; text-transform: uppercase; overflow: hidden; position: relative; } .link:hover{ color: #5b5b5b; } .link:before{ content: ""; width: 4px; height: 0; background: #4baf50; position: absolute; top: 0; left: 0; transition: all 0.3s ease 0s; } .link:hover:before{ height: 100%; } .link:after{ content: ""; width: 100%; height: 4px; background: #4baf50; position: absolute; bottom: 92%; left: 0; transition: all 0.3s ease 0s; } .link:hover:after{ bottom: 0; } @media only screen and (max-width: 767px){ .link{ margin-bottom: 20px; } }