Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>About Media 1</title>
- <style>
- body {
- margin: 0;
- }
- .top_menu {
- position: fixed;
- width: 100%;
- padding: 5px;
- background-color: green;
- display: flex;
- align-items: center;
- }
- .avatar {
- width: 50px;
- border-radius: 50%;
- float: left;
- }
- .top_menu a {
- color: snow;
- margin: 0 20px;
- }
- .items {
- position: absolute;
- right: 0;
- margin: 0 20px;
- }
- .side_menu {
- width: 100%;
- height: 100vh;
- position: absolute;
- top: 0;
- left: 0;
- background-color: black;
- display: none;
- }
- #bt_mobile {
- position: absolute;
- right: 10px;
- top: 10px;
- }
- @media all and (max-width: 425px) and (orientation: portrait) {
- .top_menu {
- display: none;
- }
- .side_menu {
- display: block;
- }
- .side_avatar {
- width: 50px;
- border-radius: 50%;
- float: left;
- margin: 20px;
- }
- #bt {
- position: absolute;
- right: 10px;
- top: 10px;
- }
- .side_menu a {
- display: block;
- margin: 20px;
- color: snow;
- }
- }
- @media all and (orientation:landscape) {
- .side_menu {
- display: none;
- width: 0px;
- }
- .side_avatar {
- display: none;
- }
- #bt {
- display: none;
- }
- .side_menu a {
- display: none;
- }
- }
- </style>
- </head>
- <body>
- <button id='bt_mobile'>OpenMobile</button>
- <div class='top_menu'>
- <img class='avatar' src='https://1xpto.netlify.app/pics/avatar.png'>
- <div class='items'>
- <a href='#'>Contact</a>
- <a href='#'>Projects</a>
- <a href='#'>Skills</a>
- <a href='#'>About</a>
- <a href='#'>Home</a>
- </div>
- </div>
- <div id='side' class='side_menu'>
- <button id='bt'>Close</button>
- <img class='side_avatar' src='https://1xpto.netlify.app/pics/avatar.png'>
- <a style='margin-top:150px;' href='#'>Contact</a>
- <a href='#'>Projects</a>
- <a href='#'>Skills</a>
- <a href='#'>About</a>
- <a href='#'>Home</a>
- </div>
- <script>
- bt.onclick = function() {
- side.style.display = 'none';
- }
- bt_mobile.onclick = function() {
- side.style.display = 'block';
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement