Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.46 KB | None | 0 0
  1. <div class="container"> <!-- This creates a container for my slideshow -->
  2. <!-- label for radio id creates a navigation bar, a button to go back and a button to go forward. Radio buttons let me choose one of the navigations and stays there -->
  3. <input type="radio" id="i1" name="images" checked />
  4. <input type="radio" id="i2" name="images" />
  5. <input type="radio" id="i3" name="images" />
  6. <input type="radio" id="i4" name="images" />
  7. <input type="radio" id="i5" name="images" />
  8.  
  9. <div class="slide_img" id="one" >
  10.  
  11. <img src="images/Books.jpg" alt="starting image for website">
  12.  
  13. <label class="prev" for="i5"><span>&#x2039;</span></label>
  14. <label class="next" for="i2"><span>&#x203a;</span></label>
  15.  
  16. </div>
  17.  
  18. <div class="slide_img" id="two" >
  19.  
  20. <img src="images/School.jpg" alt="front of school">
  21.  
  22. <label class="prev" for="i1"><span>&#x2039;</span></label> <!-- The &#x2039 is the arrow tag in the slide show-->
  23. <label class="next" for="i3"><span>&#x203a;</span></label>
  24.  
  25. </div>
  26.  
  27. <div class="slide_img" id="three" >
  28. <img src="images/reading.jpg" alt="Inside reading room">
  29.  
  30. <label class="prev" for="i2"><span>&#x2039;</span></label>
  31. <label class="next" for="i4"><span>&#x203a;</span></label>
  32. </div>
  33.  
  34. <div class="slide_img" id="four" >
  35. <img src="images/INSIDE.jpg" alt="books">
  36.  
  37. <label class="prev" for="i3"><span>&#x2039;</span></label>
  38. <label class="next" for="i5"><span>&#x203a;</span></label>
  39. </div>
  40.  
  41. <div class="slide_img" id="five" >
  42. <img src="images/COUTNER.jpg" alt="Front counter">
  43.  
  44. <label class="prev" for="i4"><span>&#x2039;</span></label>
  45. <label class="next" for="i1"><span>&#x203a;</span></label>
  46.  
  47. </div>
  48.  
  49. <div id="nav_slide">
  50. <label for="i1" class="dots" id="dot1"></label>
  51. <label for="i2" class="dots" id="dot2"></label>
  52. <label for="i3" class="dots" id="dot3"></label>
  53. <label for="i4" class="dots" id="dot4"></label>
  54. <label for="i5" class="dots" id="dot5"></label>
  55. </div><!--This code is for the dots at the bottom of the slide show, when you click on a specific dot it brings you to that part of the slide show-->
  56.  
  57. </div>
  58.  
  59. #i1, #i2, #i3, #i4, #i5{ display: none;}
  60.  
  61. .container {
  62. margin: 0 auto;
  63. margin-top: 20px;
  64. position: relative;
  65. width: 100%;
  66. height: 100%;
  67. padding-bottom: 50%;
  68. user-select: none;
  69. background-color: #1c1c1c;
  70. border: solid 10px #333;
  71. border-radius:10px ;
  72. }
  73.  
  74. .container .slide_img{ /* Places all my images in the container */
  75. position: absolute;
  76. width: 100%;
  77. height: 100%;
  78. }
  79.  
  80. .container .slide_img img{ /* Sets the image in place in the container */
  81. width: inherit; /* Sets the width to 100% */
  82. height: inherit; /* Sets the height to 100% */
  83. }
  84.  
  85. .prev, .next{
  86. width: 12%;
  87. height: inherit;
  88. position: absolute;
  89. top:0;
  90. background-color: rgba(88, 88, 88,.2);
  91. color:rgba(244, 244, 244,.9);
  92. z-index: 99;
  93. transition: .45s;
  94. cursor: pointer;
  95. text-align: center;
  96. }/* *
  97.  
  98. .next{right:0;}/* This creates a navigation part on the left of the slide showshow. */
  99.  
  100. .prev{left:0;}/* This creates a navigation part on the right side of the slideshow */
  101.  
  102. .next
  103. {
  104. margin-left:381px;
  105. }
  106. label span{
  107. position: absolute;
  108. font-size: 100pt;
  109. top: 50%;
  110. transform: translateY(-50%);
  111. }
  112.  
  113. .prev:hover, .next:hover{
  114. transition: .3s;
  115. background-color: rgba(88, 88, 89,.8);
  116. color: #ffffff;
  117. }/*This is for the effect that is shown when you go on the next part of the slideshow, the image will fade in from a dark shade of grey,*/
  118.  
  119. .container #nav_slide{
  120. width: 100%;
  121. bottom: 12%;
  122. height: 11px;
  123. position: absolute;
  124. text-align: center;
  125. z-index: 99;
  126. cursor: default;
  127. }
  128.  
  129. #nav_slide .dots{
  130. top: -5px;
  131. width: 18px;
  132. height: 18px;
  133. margin: 0 4px;
  134. position: relative;
  135. border-radius: 100%;
  136. display: inline-block;
  137. background-color: rgba(0, 0, 0, 0.6);
  138. transition: .4s;
  139. }
  140.  
  141. #nav_slide .dots:hover {
  142. cursor: pointer;
  143. background-color: rgba(255, 255, 255, 0.9);
  144. transition: .25s
  145. }
  146.  
  147. .slide_img{z-index: -1;}
  148.  
  149. #i1:checked ~ #one ,
  150. #i2:checked ~ #two ,
  151. #i3:checked ~ #three,
  152. #i4:checked ~ #four ,
  153. #i5:checked ~ #five
  154. {z-index: 9; animation: scroll 1s ease-in-out;}
  155.  
  156. #i1:checked ~ #nav_slide #dot1,
  157. #i2:checked ~ #nav_slide #dot2,
  158. #i3:checked ~ #nav_slide #dot3,
  159. #i4:checked ~ #nav_slide #dot4,
  160. #i5:checked ~ #nav_slide #dot5
  161. { background-color: rgba(255,255,255,.9);}
  162.  
  163. @keyframes scroll{
  164. 0%{ opacity:.4;}
  165. 100%{opacity:1;}
  166. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement