Advertisement
asimryu

20151013 코딩3(공주대)

Oct 12th, 2015
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.87 KB | None | 0 0
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>코딩2</title>
  6. <style>
  7. body {
  8. margin:0;
  9. }
  10. #wrap {
  11. margin:0 auto;
  12. width:940px;
  13. }
  14. header {
  15. border-radius:20px 20px 0 0;
  16. width:100%;
  17. height:300px;
  18. background-color:yellow;
  19. background-image:url(http://lorempixel.com/940/300);
  20. }
  21. nav {
  22. width:100%;
  23. height:50px;
  24. background-color:rgb(0,0,0);
  25. }
  26. nav > a {
  27. font-size:25px;
  28. color:white;
  29. text-decoration:none;
  30. height: 50px;
  31. line-height:50px;
  32. padding:0 10px;
  33. display:inline-block;
  34. }
  35. nav > a:hover { background-color:red;}
  36. section, aside { min-height:400px; float:left; }
  37. section { width:640px;}
  38. aside { width:300px; background-color:green;}
  39. .hello { width:620px; padding:10px; }
  40. .hello > h1 { font-size: 28px; margin-bottom:0;}
  41. .hello > p { font-size: 18px; line-height: 150%;}
  42. .hello > p > img { border-radius:10px; margin: 5px 5px 0 0;}
  43. .video { clear:both; }
  44. .video > div { width:320px;height:240px;float:left;}
  45.  
  46. .slide { clear:both; }
  47.  
  48. .slide > div {
  49.     margin: 20px 0;
  50.     width: 640px;
  51.     height: 300px;
  52.     position: relative;
  53.     overflow: hidden;
  54. }
  55. .slide > div > img {
  56.     width: 640px;
  57.     height: 300px;
  58.     position: absolute;
  59.     left: 0;
  60.     top: 0;
  61. }
  62. </style>
  63. </head>
  64. <body>
  65. <div id="wrap">
  66. <header id="h"></header>
  67. <nav>
  68. <a href="#rest" onmouseover="change('food')">HOME</a>
  69. <a href="#rest" onmouseover="change('cats')">HTML</a>
  70. <a href="#rest" onmouseover="change('sports')">STYLE</a>
  71. <a href="#rest" onmouseover="change('people')">JAVASCRIPT</a>
  72. <a href="#rest" onmouseover="change('city')">공주대학교</a>
  73. </nav>
  74. <section>
  75. <article class="hello">
  76. <h1>환영합니다.</h1>
  77. <p><img align="left" src="http://lorempixel.com/100/100/technics">웹을 활용한 코딩 배우기 시간에 오신것을 환영합니다. 이 강의는 국립공주대학교 학생들을 위해 개설되었으며 웹 개발 언어를 통해 컴퓨터 코딩을 이해하고 이를 통해 디지털 세계로의 접근을 보다 깊이 하기 위해 개설되었습니다.</p>
  78. </article>
  79. <article class="video">
  80. <div><iframe width="320" height="240" src="https://www.youtube.com/embed/av_QX3uSTR0" frameborder="0" allowfullscreen></iframe></div>
  81. <div><iframe width="320" height="240" src="https://www.youtube.com/embed/Rxn9_LwZ_6A" frameborder="0" allowfullscreen></iframe></div>
  82. </article>
  83. <article class="slide">
  84.     <div>
  85.         <img src="http://lorempixel.com/640/300/nightlife">
  86.         <img src="http://lorempixel.com/640/300/business">
  87.         <img src="http://lorempixel.com/640/300/technics">
  88.     </div>
  89. </article>
  90. </section>
  91. <aside>
  92. </aside>
  93. </div>
  94. <script src="http://code.jquery.com/jquery-latest.js"></script>
  95. <script>
  96. function change(c){
  97. var src = "http://lorempixel.com/940/300/" + c;
  98. $("#h").css("background-image","url(" + src + ")");
  99. }
  100.  
  101. //슬라이드
  102. $(".slide > div > img").click( function(){
  103.     $(this).animate({"left":"640px"},2000);
  104. } );
  105. </script>
  106. </body>
  107. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement