Hover Underlining
How do I make an hover underlining?
What is a hover underlining? How do you make a hover underlining? This script and codes were developed by Chung Man Chau on 15 January 2023, Sunday.
Hover Underlining - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Hover Underlining</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <nav class="nav"> <ul class="menu"> <li class="menu__item"> <span class="menu__text">Home</span> </li> <li class="menu__item"> <span class="menu__text">About Us</span> </li> <li class="menu__item"> <span class="menu__text">Latest News</span> </li> <li class="menu__item"> <span class="menu__text">Contact Us</span> </li> </ul>
</nav>
</body>
</html>
Hover Underlining - Script Codes CSS Codes
body { display: flex; justify-content: center; align-items: center; height: 100vh; font-size: 1.2rem; font-family: Arial; letter-spacing: .1rem; background: #333; color: #FAFAFA;
}
.nav { width: 100%; padding-bottom: 10px; text-align: center;
}
.menu { display: inline-flex; justify-content: space-around; width: 80vw; margin: 0; padding: 0;
}
.menu__item { list-style-type: none;
}
.menu__text { position: relative; display: inline-block; transition: color .2s ease-in-out; padding: 3px 0; margin-bottom: 10px; cursor: pointer;
}
.menu__text:hover { color: #aaa;
}
.menu__text:hover:after, .menu__text:hover:before { width: 100%; left: 0;
}
.menu__text:after, .menu__text:before { content: ''; position: absolute; top: calc(100% + 5px); width: 0; right: 0; height: 3px;
}
.menu__text:before { transition: width 0.25s cubic-bezier(0.51, 0.18, 0, 0.88) 0.3s; background: #2196f3;
}
.menu__text:after { transition: width 0.2s cubic-bezier(0.29, 0.18, 0.26, 0.83); background: #F44336;
}
Developer | Chung Man Chau |
Username | chungman93 |
Uploaded | January 15, 2023 |
Rating | 3 |
Size | 2,456 Kb |
Views | 4,048 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Morphing Iphone | 3,862 Kb |
Color Variables | 1,956 Kb |
Rolling Word Hover | 2,541 Kb |
Target Last Row - CSS Only | 1,568 Kb |
Bray Wealth - Mock up - Responsive | 4,796 Kb |
BBC Beta - Grid | 2,153 Kb |
CSS Masking Button Hovers | 1,173 Kb |
Holy Grail Layout - CSS Grid | 2,438 Kb |
Responsive CSS Grid | 3,175 Kb |
Expanding Tiles | 3,932 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Animate a paper plane along an SVG path, looking ahead | PotatoDie | 3,734 Kb |
AngularJS Datalist Directive | M-e-conroy | 2,366 Kb |
Price table | Serluk | 5,928 Kb |
Under construction | GhostRider | 1,642 Kb |
Another brick in the wall | Fivera | 1,955 Kb |
Ghost | Mghayour | 11,738 Kb |
A Pen by Final Boss tommyb9 | FBtommyb9 | 55,354 Kb |
Pure CSS read more toggle | Idered | 2,344 Kb |
Jochaho Skeleton | Dhanushbadge | 1,689 Kb |
The Fantastic Mr Fox | MalZiiirA | 10,435 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!