Skip to content

Instantly share code, notes, and snippets.

Created September 29, 2015 20:48
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save rajatbarman/77c54da55cf95c68c5bd to your computer and use it in GitHub Desktop.
ul {position: relative;margin: 0;padding: 0;}li {display: inline-block;width: 100px;text-align: center;border-bottom: 5px solid #ccc;} ~ div {left: 200px;background: blue;} ~ div {left: 100px;background: green;} ~ div{background: red;left: 0;}div {position: absolute;height: 5px;top: 17px;width: 100px;transition: all 1s ease;left: 0;}
<section class="menu">
<ul> <li class="red">Hey</li><li class="green">Hello</li><li class="blue" >World</li>
// alert('Hello world!');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment