Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!doctype html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>반응형웹- Responsive Web</title>
- <style>
- body { background-color: black; margin: 0;}
- #wrap {
- margin: 0 auto;
- width: 1024px;
- min-height: 768px;
- background-color: white;
- }
- header {
- width: 1024px;
- height: 300px;
- background-image: url(http://lorempixel.com/1024/300);
- }
- nav { width: 100%; background-color: red;}
- nav a {
- width: auto;
- height: 50px;
- padding: 0 10px;
- background-color: pink;
- color: black;
- line-height: 50px;
- display: inline-block;
- }
- #viewmenu {display: none;}
- @media screen and (max-width:768px){
- #wrap { width: 768px; }
- header {
- width: 768px;
- height: 200px;
- background-image: url(http://lorempixel.com/768/200);
- }
- }
- @media screen and (max-width:320px){
- #wrap { width: 320px; }
- header {
- width: 320px;
- height: 80px;
- background-image: url(http://lorempixel.com/320/80);
- }
- nav a {
- width:100%;
- height: 30px;
- line-height: 30px;
- border-bottom: 1px solid white;
- }
- #viewmenu {display: inline-block;}
- .menu { display: none;}
- #viewmenu:focus ~ .menu{
- display: inline-block;
- }
- }
- </style>
- </head>
- <body>
- <div id="wrap">
- <header></header>
- <nav>
- <a href="#" id="viewmenu">MENU...</a>
- <a href="#" class="menu">HOME</a>
- <a href="#" class="menu">HTML</a>
- <a href="#" class="menu">CSSS</a>
- <a href="#" class="menu">JavaScript</a>
- <a href="#" class="menu">PHP</a>
- <a href="#" class="menu">Database</a>
- </nav>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement