Advertisement
Guest User

Untitled

a guest
Feb 6th, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.60 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>8-bit</title>
  6. <link href="/style.css" rel="stylesheet" type="text/css" media="all">
  7. <style>
  8. /*you can change the bg if you want but try not to change the other stuff it will mess up the theme*/
  9. body
  10. { background: url("https://s-media-cache-ak0.pinimg.com/736x/d8/cf/db/d8cfdbfb66fe19b6a341625ca39e0892.jpg") no-repeat center center fixed;
  11. -webkit-background-size: cover;
  12. -moz-background-size: cover;
  13. -o-background-size: cover;
  14. background-size: cover;
  15. }
  16. /*container that holds the text and image */
  17. .test{
  18. width:300px;
  19. background-color:white;
  20. margin:auto;
  21. display:block;
  22. height:300px;
  23. position: absolute;
  24. top: 50%;
  25. margin-top: -150px;
  26. }
  27. /*fade in animmation */
  28. @-webkit-keyframes fadeEffect {
  29. from {opacity: 0;}
  30. to {opacity: 1;}
  31. }
  32.  
  33. @keyframes fadeEffect {
  34. from {opacity: 0;}
  35. to {opacity: 1;}
  36. }
  37.  
  38. /*takes away the image on hover*/
  39.  
  40. /*fades in the text on hover*/
  41. .test:hover .content { display: block;
  42. -webkit-animation: fadeEffect 1.5s;
  43. animation: fadeEffect 1.5s;
  44. }
  45. /* makes sure the image is the same size as container */
  46. img.title{
  47. width:300px;
  48.  
  49. }
  50.  
  51. .test:hover .title {
  52. display: none;
  53. }
  54. /* makes text invisible to begin with */
  55. .test .content { display: none; }
  56. /*scrollbar inside the text box*/
  57. ::-webkit-scrollbar {
  58. width:5px;
  59. color:white;}
  60. .credit{
  61. font-size: 12px;
  62. position: absolute;
  63. bottom: 0;
  64. right: 0;}
  65. </style>
  66. </head>
  67. <body>
  68.  
  69. <!-- I kept this so you could see where i have the margins set, feel free to move them to fit your screen but theyre not super dynamic with other screen sizes !-->
  70. <div class="test" style="margin-left:100px;">
  71. <img class="title " src="https://cdn.instructables.com/FFB/WMFG/FWBNM65X/FFBWMFGFWBNM65X.MEDIUM.jpg">
  72. <p class="content">here's some text about yourself</p>
  73. <p class="content"> here is a list:
  74. <ul class="content">
  75. <li> one</li>
  76. <li> two</li>
  77. <li> three</li> </ul> </div>
  78. <div class="test" style="margin-left:500px;">
  79. <img class="title" src="https://cdn.instructables.com/FFB/WMFG/FWBNM65X/FFBWMFGFWBNM65X.MEDIUM.jpg">
  80. <p class="content">im gay</p>
  81. </div>
  82. <div class="test" style="margin-left: 900px;">
  83. <img class="title" src="https://cdn.instructables.com/FFB/WMFG/FWBNM65X/FFBWMFGFWBNM65X.MEDIUM.jpg">
  84. <p class="content">i love mario</p>
  85.  
  86. </div>
  87. <!-- please dont delete, feel free to ask me any questions about coding !-->
  88. <div class="credit">
  89. <a href="http://twitter.com/tcadsworth"> @peachie</a>
  90. </body>
  91. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement