Advertisement
asimryu

html 기본 레이아웃(20150908)

Sep 7th, 2015
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.80 KB | None | 0 0
  1. <!doctype html>
  2. <html lang="ko">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>2015년 9월 8일</title>
  6. <style>
  7. body {
  8. /*background-color: black;*/
  9. /*background-color: #000000;*/
  10. /*background-color: #000;*/
  11. background-color: rgb(0,0,0);
  12. margin: 0;
  13. }
  14. .wrap {
  15. margin: 0 auto;
  16. width: 800px;
  17. min-height: 600px;
  18. background-color: rgb(255,255,255);
  19. border-radius: 20px 20px 0 0;
  20. }
  21. header {
  22. width: 100%;
  23. height: 300px;
  24. background-image: url(http://lorempixel.com/800/300);
  25. border-radius: 20px 20px 0 0;
  26. }
  27. nav {
  28. width: 100%;
  29. height: 50px;
  30. background-color: #186cb2;
  31. }
  32. nav a {
  33. color: white;
  34. width: auto;
  35. height: 50px;
  36. font-size: 1.5em;
  37. line-height: 50px;
  38. padding: 0 10px;
  39. display: inline-block;
  40. }
  41. nav a:hover {
  42. background-color: rgb(255,0,255);
  43. color: #000;
  44. }
  45. main {
  46. width: 100%;
  47. height: 300px;
  48. }
  49. main > div {
  50. float: left;
  51. width: 400px;
  52. height: 300px;
  53. }
  54. footer {
  55. clear: both;
  56. width: 100%;
  57. height: 50px;
  58. background-color: #186cb2;
  59. color: #fff;
  60. text-align: center;
  61. line-height: 50px;
  62. }
  63. .vlist {
  64. width: 100%;
  65. height: 100px;
  66. background-color: green;
  67. display: block;
  68. line-height: 100px;
  69. color: white;
  70. text-align: center;
  71. }
  72. .vlist:hover {
  73. background-color: pink;
  74. color: black;
  75. }
  76. </style>
  77. </head>
  78. <body>
  79. <div class="wrap">
  80. <header id="hdr"></header>
  81. <nav>
  82. <a href="#" onmouseover="bg('food')">HOME</a>
  83. <a href="#" onmouseover="bg('sports')">HTML</a>
  84. <a href="#" onmouseover="bg('transport')">CSS</a>
  85. <a href="#" onmouseover="bg('city')">JavaScript</a>
  86. </nav>
  87. <main>
  88. <div><iframe width="400" height="300" src="https://www.youtube.com/embed/63s8RxqA4GQ" frameborder="0" allowfullscreen></iframe></div>
  89. <div><iframe width="400" height="300" src="https://www.youtube.com/embed/YhjMkjOHloM" frameborder="0" allowfullscreen></iframe></div>
  90. <div>
  91. <a href="javascript:vd('j6wmKhbspAk');" class="vlist">동영상1</a>
  92. <a href="javascript:vd('mmzTO2PXzY8');" class="vlist">동영상2</a>
  93. <a href="javascript:vd('TN_10DKCuZk');" class="vlist">동영상3</a>
  94. </div>
  95. <div><iframe id="myvideo" width="400" height="300" src="https://www.youtube.com/embed/EqRy77_OOGY" frameborder="0" allowfullscreen></iframe></div>
  96. </main>
  97. <footer>
  98. &copy; 2015 유승열 All Rights Reserved.
  99. </footer>
  100. </div>
  101. <script>
  102. function bg(c){
  103. var src = "http://lorempixel.com/800/300/" + c ;
  104. var h = document.getElementById("hdr");
  105. h.style.backgroundImage = "url(" + src + ")";
  106. }
  107. function vd(v){
  108. var url="https://www.youtube.com/embed/" + v + "?autoplay=1";
  109. var i = document.getElementById("myvideo");
  110. i.src = url;
  111. }
  112. </script>
  113. </body>
  114. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement