Diagonal Nav bar
How do I make an diagonal nav bar?
Using ::before and ::after to create a diagonal style navigation . What is a diagonal nav bar? How do you make a diagonal nav bar? This script and codes were developed by Nick Colley on 12 November 2022, Saturday.
Diagonal Nav bar - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Diagonal Nav bar</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ * { box-sizing: border-box; }
ul { height: 2.500em; width: 100%; padding: 0; margin: 0; background: #EEE; font-size: 16px;
}
li { position: relative; display: block; float: left; margin-right: 1.563em; height: 100%; width: 6.25em; cursor: pointer; user-select: none; background: #EEE; color: #555; text-align: center; line-height: 2.5em;
}
li::before { content: ''; position: absolute; display: block; left: -1.5em; width: 0; height: 0; border-top: 2.5em solid transparent; border-right: 1.563em solid #EEE;
}
li::after { content: ''; position: absolute; display: block; top: 0; right: -1.5em; width: 0; height: 0; border-top: 2.5em solid #EEE; border-right: 1.563em solid transparent;
}
/* Hover */
li:hover { color: #666; background: #CCC;
}
li:hover::after { border-top: 2.5em solid #CCC; border-right: 1.563em solid transparent;
}
li:hover::before { border-top: 2.5em solid transparent; border-right: 1.563em solid #CCC;
}
/* Active */
li:active { color: #BBB; background: #DDD;
}
li:active::after { border-top: 2.5em solid #DDD; border-right: 1.563em solid transparent;
}
li:active::before { border-top: 2.5em solid transparent; border-right: 1.563em solid #DDD;
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <ul> <li>Home</li> <li>Contact</li> <li>Contact</li> <li>About</li>
</ul> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
</body>
</html>
Diagonal Nav bar - Script Codes CSS Codes
* { box-sizing: border-box; }
ul { height: 2.500em; width: 100%; padding: 0; margin: 0; background: #EEE; font-size: 16px;
}
li { position: relative; display: block; float: left; margin-right: 1.563em; height: 100%; width: 6.25em; cursor: pointer; user-select: none; background: #EEE; color: #555; text-align: center; line-height: 2.5em;
}
li::before { content: ''; position: absolute; display: block; left: -1.5em; width: 0; height: 0; border-top: 2.5em solid transparent; border-right: 1.563em solid #EEE;
}
li::after { content: ''; position: absolute; display: block; top: 0; right: -1.5em; width: 0; height: 0; border-top: 2.5em solid #EEE; border-right: 1.563em solid transparent;
}
/* Hover */
li:hover { color: #666; background: #CCC;
}
li:hover::after { border-top: 2.5em solid #CCC; border-right: 1.563em solid transparent;
}
li:hover::before { border-top: 2.5em solid transparent; border-right: 1.563em solid #CCC;
}
/* Active */
li:active { color: #BBB; background: #DDD;
}
li:active::after { border-top: 2.5em solid #DDD; border-right: 1.563em solid transparent;
}
li:active::before { border-top: 2.5em solid transparent; border-right: 1.563em solid #DDD;
}
Developer | Nick Colley |
Username | nickcolley |
Uploaded | November 12, 2022 |
Rating | 3 |
Size | 2,392 Kb |
Views | 28,336 |
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 |
Wip elementary os navbar | 2,993 Kb |
Music | 4,521 Kb |
Horizontal Scroll with device motion | 2,446 Kb |
Erno | 5,311 Kb |
Curl Dropshadow | 1,623 Kb |
Linux Install Terminal | 2,259 Kb |
Flickering TV | 167,407 Kb |
Close animation | 2,207 Kb |
Custom Soundcloud Player | 3,033 Kb |
Centered Text in a Perfect Circle | 2,410 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 |
Automatic scroll | Skeurentjes | 4,042 Kb |
JavaScript Animation | Rcmeisty | 4,581 Kb |
CSS3 Animated buttons | Cguillou | 3,737 Kb |
The Rope | Chribbe | 2,886 Kb |
Mondrian | Chrisarmstrong | 2,787 Kb |
Slider | Mohammed-fawzy | 2,634 Kb |
Twitch TV | Natester13 | 4,488 Kb |
Page Transitions in Backbone | Mikefowler | 3,691 Kb |
Smoke Shader - Frame Buffer | Omarshe7ta | 2,672 Kb |
Popup Modal | Aldlevine | 3,696 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!