farfnd

slider.css

Sep 28th, 2021 (edited)
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 1.75 KB | None | 0 0
  1. * {box-sizing:border-box}
  2.  
  3. /* Slideshow container */
  4. .slideshow-container {
  5.   max-width: 100%;
  6.   position: relative;
  7.   margin: auto;
  8.   height: 400px;
  9. }
  10.  
  11. .slideshow-container img{
  12.   width: 100%;
  13.   object-fit: cover;
  14.   max-height: 400px;
  15. }
  16.  
  17. /* Hide the images by default */
  18. .mySlides {
  19.   display: none;
  20. }
  21.  
  22. /* Next & previous buttons */
  23. .prev, .next {
  24.   cursor: pointer;
  25.   position: absolute;
  26.   top: 50%;
  27.   width: auto;
  28.   margin-top: -22px;
  29.   padding: 16px;
  30.   color: white;
  31.   font-weight: bold;
  32.   font-size: 18px;
  33.   transition: 0.6s ease;
  34.   border-radius: 0 3px 3px 0;
  35.   user-select: none;
  36. }
  37.  
  38. /* Position the "next button" to the right */
  39. .next {
  40.   right: 0;
  41.   border-radius: 3px 0 0 3px;
  42. }
  43.  
  44. /* On hover, add a black background color with a little bit see-through */
  45. .prev:hover, .next:hover {
  46.   background-color: rgba(0,0,0,0.8);
  47. }
  48.  
  49. /* Caption text */
  50. .text {
  51.   color: #f2f2f2;
  52.   font-size: 15px;
  53.   padding: 8px 12px;
  54.   position: absolute;
  55.   bottom: 8px;
  56.   width: 100%;
  57.   text-align: center;
  58. }
  59.  
  60. /* Number text (1/3 etc) */
  61. .numbertext {
  62.   color: #f2f2f2;
  63.   font-size: 12px;
  64.   padding: 8px 12px;
  65.   position: absolute;
  66.   top: 0;
  67. }
  68.  
  69. /* The dots/bullets/indicators */
  70. .dot {
  71.   cursor: pointer;
  72.   height: 15px;
  73.   width: 15px;
  74.   margin: 0 2px;
  75.   background-color: #bbb;
  76.   border-radius: 50%;
  77.   display: inline-block;
  78.   transition: background-color 0.6s ease;
  79. }
  80.  
  81. .active, .dot:hover {
  82.   background-color: #717171;
  83. }
  84.  
  85. /* Fading animation */
  86. .fade {
  87.   -webkit-animation-name: fade;
  88.   -webkit-animation-duration: 1.5s;
  89.   animation-name: fade;
  90.   animation-duration: 1.5s;
  91. }
  92.  
  93. @-webkit-keyframes fade {
  94.   from {opacity: .4}
  95.   to {opacity: 1}
  96. }
  97.  
  98. @keyframes fade {
  99.   from {opacity: .4}
  100.   to {opacity: 1}
  101. }
Add Comment
Please, Sign In to add comment