Advertisement
oscarviedma

Estilos CSS Slick.js Tutorial Slider Horizontal

Jul 15th, 2021
2,570
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 4.61 KB | None | 0 0
  1. .slider-for {
  2.   max-width: 1200px;
  3.   width: 100%;
  4.   margin: 0 auto;
  5. }
  6.  
  7. /* Slider */
  8. .slick-slider {
  9.     position: relative;
  10.     display: block;
  11.     box-sizing: border-box;
  12.     -webkit-user-select: none;
  13.        -moz-user-select: none;
  14.         -ms-user-select: none;
  15.             user-select: none;
  16.     -webkit-touch-callout: none;
  17.     -khtml-user-select: none;
  18.     -ms-touch-action: pan-y;
  19.         touch-action: pan-y;
  20.     -webkit-tap-highlight-color: transparent;
  21. }
  22. .slick-list {
  23.     position: relative;
  24.     display: block;
  25.     overflow: hidden;
  26.     margin: 0;
  27.     padding: 0;
  28. }
  29. .slick-list:focus {
  30.     outline: none;
  31. }
  32. .slick-list.dragging {
  33.     cursor: pointer;
  34.     cursor: hand;
  35. }
  36. .slick-slider .slick-track,
  37. .slick-slider .slick-list {
  38.     -webkit-transform: translate3d(0, 0, 0);
  39.        -moz-transform: translate3d(0, 0, 0);
  40.         -ms-transform: translate3d(0, 0, 0);
  41.          -o-transform: translate3d(0, 0, 0);
  42.             transform: translate3d(0, 0, 0);
  43. }
  44. .slick-track {
  45.     position: relative;
  46.     top: 0;
  47.     left: 0;
  48.     display: block;
  49.     margin-left: auto;
  50.     margin-right: auto;
  51. }
  52. .slick-track:before,
  53. .slick-track:after {
  54.     display: table;
  55.     content: '';
  56. }
  57. .slick-track:after {
  58.     clear: both;
  59. }
  60. .slick-loading .slick-track {
  61.     visibility: hidden;
  62. }
  63. .slick-slide {
  64.     display: none;
  65.     float: left;
  66.     height: 100%;
  67.     min-height: 1px;
  68. }
  69. [dir='rtl'] .slick-slide {
  70.     float: right;
  71. }
  72. .slick-slide img {
  73.     display: block;
  74. }
  75. .slick-slide.slick-loading img {
  76.     display: none;
  77. }
  78. .slick-slide.dragging img {
  79.     pointer-events: none;
  80. }
  81. .slick-initialized .slick-slide {
  82.     display: block;
  83. }
  84. .slick-loading .slick-slide {
  85.     visibility: hidden;
  86. }
  87. .slick-vertical .slick-slide {
  88.     display: block;
  89.     height: auto;
  90.     border: 1px solid transparent;
  91. }
  92. .slick-arrow.slick-hidden {
  93.     display: none;
  94. }
  95.  
  96. /* Dots */
  97. .slick-dotted.slick-slider {
  98.     margin-bottom: 30px;
  99. }
  100. .slick-dots {
  101.     position: absolute;
  102.     display: block;
  103.     width: 100%;
  104.     padding: 0;
  105.     margin: 0;
  106.     list-style: none;
  107.     text-align: center;
  108. }
  109. .slick-dots li {
  110.     position: relative;
  111.     display: inline-block;
  112.     width: 20px;
  113.     height: 20px;
  114.     margin: 0 5px;
  115.     padding: 0;
  116.     cursor: pointer;
  117. }
  118. .slick-dots li button {
  119.     font-size: 0;
  120.     line-height: 0;
  121.     display: block;
  122.     width: 20px;
  123.     height: 20px;
  124.     padding: 5px;
  125.     cursor: pointer;
  126.     color: transparent;
  127.     border: 0;
  128.     outline: none;
  129.     background: transparent;
  130. }
  131. .slick-dots li button:hover,
  132. .slick-dots li button:focus {
  133.     outline: none;
  134. }
  135. .slick-dots li button:hover:before,
  136. .slick-dots li button:focus:before {
  137.     opacity: 1;
  138. }
  139. .slick-dots li button:before {
  140.     font-family: 'slick';
  141.     font-size: 28px;
  142.     line-height: 20px;
  143.     position: absolute;
  144.     top: 0;
  145.     left: 0;
  146.     width: 20px;
  147.     height: 20px;
  148.     content: '•';
  149.     text-align: center;
  150.     opacity: .25;
  151.     color: black;
  152.     -webkit-font-smoothing: antialiased;
  153.     -moz-osx-font-smoothing: grayscale;
  154. }
  155. .slick-dots li.slick-active button:before {
  156.     opacity: .75;
  157.     color: black;
  158. }
  159.  
  160. /* Arrows */
  161. .slick-prev,
  162. .slick-next {
  163.     font-size: 0;
  164.     line-height: 0;
  165.     position: absolute;
  166.     top: 50%;
  167.     display: block;
  168.     width: 30px;
  169.     height: 30px;
  170.     padding: 0;
  171.     -webkit-transform: translate(0, -50%);
  172.     -ms-transform: translate(0, -50%);
  173.     transform: translate(0, -50%);
  174.     cursor: pointer;
  175.     color: transparent;
  176.     border: none;
  177.     outline: none;
  178.     background: #14b9d5;
  179. }
  180. .slick-prev:hover,
  181. .slick-prev:focus,
  182. .slick-next:hover,
  183. .slick-next:focus {
  184.     outline: none;
  185. }
  186. .slick-prev:hover:before,
  187. .slick-prev:focus:before,
  188. .slick-next:hover:before,
  189. .slick-next:focus:before {
  190.     opacity: 1;
  191. }
  192. .slick-prev.slick-disabled:before,
  193. .slick-next.slick-disabled:before {
  194.     opacity: .25;
  195. }
  196.  
  197. .slick-prev:before,
  198. .slick-next:before {
  199.     font-family: 'etmodules';
  200.     font-size: 25px;
  201.     line-height: 1;
  202.     opacity: .75;
  203.     color: white;
  204.     -webkit-font-smoothing: antialiased;
  205.     -moz-osx-font-smoothing: grayscale;
  206. }
  207.  
  208. .slick-prev {
  209.     left: 16px;
  210.     z-index: 99;
  211. }
  212. [dir='rtl'] .slick-prev {
  213.     right: 16px;
  214.     left: auto;
  215. }
  216. .slick-prev:before {
  217.     content: '\34';
  218. }
  219. [dir='rtl'] .slick-prev:before {
  220.     content: '\35';
  221. }
  222. .slick-next {
  223.     right: 16px;
  224.     z-index: 99;
  225. }
  226. [dir='rtl'] .slick-next {
  227.     right: auto;
  228.     left: 16px;
  229. }
  230. .slick-next:before {
  231.     content: '\35';
  232. }
  233. [dir='rtl'] .slick-next:before {
  234.     content: '\34';
  235. }
  236.  
  237. .slider-nav .slick-slide {
  238.   cursor: pointer;
  239. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement