Menu Hover Effect

Menu Hover Effect code:

1.index.html:

<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Menu Hover Effect</title> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <ul> <li><a href="#">Home</a></li> <li><a href="#">About</a></li> <li><a href="#">Services</a></li> <li><a href="#">Contact</a></li> </ul> </body> </html>

2.style.css:

body { margin: 0; padding: 0; font-family: Verdana, Geneva, Tahoma, sans-serif; background: red; } ul { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); display: flex; margin: 0; padding: 0; } ul li { list-style: none; transition: 0.5s; } ul li a { position: relative; display: block; text-align: center; margin: 0 25px; color: black; font-size: 40px; text-decoration: none; text-transform: uppercase; } ul:hover li { opacity: 0.2; filter: blur(2px); } ul li:hover { opacity: 1; filter: blur(0px); }

Оставьте комментарий

Ваш адрес email не будет опубликован.