A Pen by Luis Fernando Gutiérrez Romo on CodePen.
Created
July 12, 2020 21:54
-
-
Save luisfergromo/722778403f9356666b5015ef1e8fa22a to your computer and use it in GitHub Desktop.
qBbyaQg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div id="root"></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ReactDOM.render( | |
| <section> | |
| <nav> | |
| <ul> | |
| <li id="home" class="item-nav"> | |
| <a href="#home">Home</a> | |
| </li> | |
| <li id="about" class="item-nav"><a href="#<about">About</a></li> | |
| </ul> | |
| </nav> | |
| </section>, | |
| document.getElementById("root") | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script src="https://unpkg.com/react/umd/react.development.js"></script> | |
| <script src="https://unpkg.com/react-dom/umd/react-dom.development.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| * { | |
| padding: 0; | |
| margin: 0; | |
| } | |
| a { | |
| text-decoration: none; | |
| color: black; | |
| } | |
| .welcome { | |
| width: 100%; | |
| height: 100vh; | |
| align-content: center; | |
| display: flex; | |
| } | |
| #home { | |
| display: flex; | |
| top: 0; | |
| left: 0; | |
| position: fixed; | |
| width: 100%; | |
| z-index: 10; | |
| justify-content: flex-start; | |
| } | |
| #about { | |
| display: flex; | |
| top: 0; | |
| left: -40px; | |
| position: fixed; | |
| width: 100%; | |
| z-index: 10; | |
| justify-content: flex-end; | |
| } | |
| nav { | |
| height: 40px; | |
| background-color: graytext; | |
| } | |
| nav ul { | |
| list-style: none; | |
| } | |
| .item-nav { | |
| display: inline; | |
| padding: 1rem; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment