* { padding: 0; margin: 0; } // Developed by http://grohit.com/ body { display: flex; flex-direction: column; justify-content: center; align-items: center; position: relative; min-height: 100vh; font-family: Hack, monospace; } div { color: #727272; text-align: center; } p { margin: 16px; font-size: 96px; color: #ccc; text-transform: uppercase; font-weight: 600; transition: all 1s ease-in-out; position: relative; &::before { content: attr(data-item); transition: all 1s ease-in-out; color: #8254ff; position: absolute; top: 0; bottom: 0; left: 0; right: 0; width: 0; overflow: hidden; } &:hover { &::before { width: 100%; } } } nav { margin: 25px; background: #f9f9f9; padding: 16px; .menuItems { list-style: none; display: flex; li { margin: 50px; a { text-decoration: none; color: #8f8f8f; font-size: 24px; font-weight: 400; transition: all 0.5s ease-in-out; position: relative; text-transform: uppercase; &::before { content: attr(data-item); transition: 0.5s; color: #8254ff; position: absolute; top: 0; bottom: 0; left: 0; right: 0; width: 0; overflow: hidden; } &:hover { &::before { width: 100%; transition: all 0.5s ease-in-out; } } } } } } // Developed by http://grohit.com/ footer { position: absolute; font-size: 12px; bottom: 0; width: 100%; height: 60px; line-height: 60px; font-size: 14px; background-color: #f1f1f1; color: #000000; text-align: center; a { text-decoration: none; color: inherit; border-bottom: 1px solid; &:hover { border-bottom: 1px transparent; } } }