Dark CSS

Navigation Menu Hover Effects CSS

Facebook
Twitter
WhatsApp

code preview

html code

				
					<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
    <nav class="menu">
        <a href="#">Home</a>
        <a href="#">About</a>
        <a href="#">Services</a>
        <a href="#">Contact</a>
    </nav>
</body>
</html>
				
			

CSS code

				
					* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

html,
body {
    display: grid;
    height: 100%;
    place-items: center;
    background: #212121;
}

.menu a {
    font-size: 14px;
    border-radius: 5px;
    text-decoration: none;
    padding: 10px 50px;
    color: #fff;
    background: #333;
    display: flex;
    flex-direction: column;
    text-transform: uppercase;
    margin: 10px 0px;
    letter-spacing: 1px;
    text-align: center;
    transition: 0.3s ease;
}

.menu a:hover {
    background: #ff6ecf;
    transform: scale(1.1);
}