images
8 years ago
slippry.css
8 years ago
slippry.js
5 years ago
slippry.min.css
8 years ago
slippry.min.js
5 years ago
slippry.css
286 lines
| 1 | /** |
| 2 | * |
| 3 | * slippry v1.4.0 - Responsive content slider for jQuery |
| 4 | * http://slippry.com |
| 5 | * |
| 6 | * Authors: Lukas Jakob Hafner - @saftsaak |
| 7 | * Thomas Hurd - @SeenNotHurd |
| 8 | * |
| 9 | * Copyright 2016, booncon oy - http://booncon.com |
| 10 | * |
| 11 | * |
| 12 | * Released under the MIT license - http://opensource.org/licenses/MIT |
| 13 | */ |
| 14 | /* kenBurns animations, very basic */ |
| 15 | @-webkit-keyframes left-right { |
| 16 | 0% { |
| 17 | -webkit-transform: translateY(-20%) translateX(-10%); |
| 18 | transform: translateY(-20%) translateX(-10%); } |
| 19 | 100% { |
| 20 | -webkit-transform: translateY(0%) translateX(10%); |
| 21 | transform: translateY(0%) translateX(10%); } } |
| 22 | @-o-keyframes left-right { |
| 23 | 0% { |
| 24 | -o-transform: translateY(-20%) translateX(-10%); |
| 25 | transform: translateY(-20%) translateX(-10%); } |
| 26 | 100% { |
| 27 | -o-transform: translateY(0%) translateX(10%); |
| 28 | transform: translateY(0%) translateX(10%); } } |
| 29 | @keyframes left-right { |
| 30 | 0% { |
| 31 | -webkit-transform: translateY(-20%) translateX(-10%); |
| 32 | -o-transform: translateY(-20%) translateX(-10%); |
| 33 | transform: translateY(-20%) translateX(-10%); } |
| 34 | 100% { |
| 35 | -webkit-transform: translateY(0%) translateX(10%); |
| 36 | -o-transform: translateY(0%) translateX(10%); |
| 37 | transform: translateY(0%) translateX(10%); } } |
| 38 | @-webkit-keyframes right-left { |
| 39 | 0% { |
| 40 | -webkit-transform: translateY(0%) translateX(10%); |
| 41 | transform: translateY(0%) translateX(10%); } |
| 42 | 100% { |
| 43 | -webkit-transform: translateY(-20%) translateX(-10%); |
| 44 | transform: translateY(-20%) translateX(-10%); } } |
| 45 | @-o-keyframes right-left { |
| 46 | 0% { |
| 47 | -o-transform: translateY(0%) translateX(10%); |
| 48 | transform: translateY(0%) translateX(10%); } |
| 49 | 100% { |
| 50 | -o-transform: translateY(-20%) translateX(-10%); |
| 51 | transform: translateY(-20%) translateX(-10%); } } |
| 52 | @keyframes right-left { |
| 53 | 0% { |
| 54 | -webkit-transform: translateY(0%) translateX(10%); |
| 55 | -o-transform: translateY(0%) translateX(10%); |
| 56 | transform: translateY(0%) translateX(10%); } |
| 57 | 100% { |
| 58 | -webkit-transform: translateY(-20%) translateX(-10%); |
| 59 | -o-transform: translateY(-20%) translateX(-10%); |
| 60 | transform: translateY(-20%) translateX(-10%); } } |
| 61 | /* added to the original element calling slippry */ |
| 62 | .sy-box.sy-loading { |
| 63 | background: url("images/sy-loader.gif") 50% 50% no-repeat; |
| 64 | -webkit-background-size: 32px 32px; |
| 65 | background-size: 32px; |
| 66 | min-height: 40px; } |
| 67 | .sy-box.sy-loading .sy-slides-wrap, .sy-box.sy-loading .sy-pager { |
| 68 | visibility: hidden; } |
| 69 | |
| 70 | /* element that wraps the slides */ |
| 71 | .sy-slides-wrap { |
| 72 | position: relative; |
| 73 | height: 100%; |
| 74 | width: 100%; } |
| 75 | .sy-slides-wrap:hover .sy-controls { |
| 76 | display: block; } |
| 77 | |
| 78 | /* element that crops the visible area to the slides */ |
| 79 | .sy-slides-crop { |
| 80 | height: 100%; |
| 81 | width: 100%; |
| 82 | position: absolute; |
| 83 | overflow: hidden; } |
| 84 | |
| 85 | /* list containing the slides */ |
| 86 | .sy-list { |
| 87 | width: 100%; |
| 88 | height: 100%; |
| 89 | list-style: none; |
| 90 | margin: 0; |
| 91 | padding: 0; |
| 92 | position: absolute; } |
| 93 | .sy-list.horizontal { |
| 94 | -webkit-transition: left ease; |
| 95 | -o-transition: left ease; |
| 96 | transition: left ease; } |
| 97 | .sy-list.vertical { |
| 98 | -webkit-transition: top ease; |
| 99 | -o-transition: top ease; |
| 100 | transition: top ease; } |
| 101 | |
| 102 | /* single slide */ |
| 103 | .sy-slide { |
| 104 | position: absolute; |
| 105 | width: 100%; |
| 106 | z-index: 2; } |
| 107 | .sy-slide.kenburns { |
| 108 | width: 140%; |
| 109 | left: -20%; } |
| 110 | .sy-slide.kenburns.useCSS { |
| 111 | -webkit-transition-property: opacity; |
| 112 | -o-transition-property: opacity; |
| 113 | transition-property: opacity; } |
| 114 | .sy-slide.kenburns.useCSS.sy-ken:nth-child(1n) { |
| 115 | -webkit-animation-name: left-right; |
| 116 | -o-animation-name: left-right; |
| 117 | animation-name: left-right; |
| 118 | -webkit-animation-fill-mode: forwards; |
| 119 | -o-animation-fill-mode: forwards; |
| 120 | animation-fill-mode: forwards; } |
| 121 | .sy-slide.kenburns.useCSS.sy-ken:nth-child(2n) { |
| 122 | -webkit-animation-name: right-left; |
| 123 | -o-animation-name: right-left; |
| 124 | animation-name: right-left; |
| 125 | -webkit-animation-fill-mode: forwards; |
| 126 | -o-animation-fill-mode: forwards; |
| 127 | animation-fill-mode: forwards; } |
| 128 | .sy-slide.sy-active { |
| 129 | z-index: 3; } |
| 130 | .sy-slide > img { |
| 131 | margin: 0; |
| 132 | padding: 0; |
| 133 | display: block; |
| 134 | width: 100%; |
| 135 | border: 0; } |
| 136 | .sy-slide > a { |
| 137 | margin: 0; |
| 138 | padding: 0; |
| 139 | display: block; |
| 140 | width: 100%; } |
| 141 | .sy-slide > a > img { |
| 142 | margin: 0; |
| 143 | padding: 0; |
| 144 | display: block; |
| 145 | width: 100%; |
| 146 | border: 0; } |
| 147 | |
| 148 | /* next/ prev buttons, with arrows and clickable area a lot larger than the visible buttons */ |
| 149 | .sy-controls { |
| 150 | display: none; |
| 151 | list-style: none; |
| 152 | height: 100%; |
| 153 | width: 100%; |
| 154 | position: absolute; |
| 155 | padding: 0; |
| 156 | margin: 0; } |
| 157 | .sy-controls li { |
| 158 | position: absolute; |
| 159 | width: 10%; |
| 160 | min-width: 4.2em; |
| 161 | height: 100%; |
| 162 | z-index: 33; } |
| 163 | .sy-controls li.sy-prev { |
| 164 | left: 0; |
| 165 | top: 0; } |
| 166 | .sy-controls li.sy-prev a:after { |
| 167 | background-position: -5% 0; } |
| 168 | .sy-controls li.sy-next { |
| 169 | right: 0; |
| 170 | top: 0; } |
| 171 | .sy-controls li.sy-next a:after { |
| 172 | background-position: 105% 0; } |
| 173 | .sy-controls li a { |
| 174 | position: relative; |
| 175 | width: 100%; |
| 176 | height: 100%; |
| 177 | display: block; |
| 178 | text-decoration: none; |
| 179 | box-shadow: none; |
| 180 | text-indent: -9999px; } |
| 181 | .sy-controls li a:link, .sy-controls li a:visited { |
| 182 | opacity: 0.4; } |
| 183 | .sy-controls li a:hover, .sy-controls li a:focus { |
| 184 | opacity: 0.8; |
| 185 | outline: none; } |
| 186 | .sy-controls li a:after { |
| 187 | content: ""; |
| 188 | background-image: url("images/arrows.svg"); |
| 189 | background-repeat: no-repeat; |
| 190 | -webkit-background-size: cover; |
| 191 | background-size: cover; |
| 192 | text-align: center; |
| 193 | text-indent: 0; |
| 194 | line-height: 2.8em; |
| 195 | color: #111; |
| 196 | font-weight: 800; |
| 197 | position: absolute; |
| 198 | background-color: #fff; |
| 199 | width: 2.8em; |
| 200 | height: 2.8em; |
| 201 | left: 50%; |
| 202 | top: 50%; |
| 203 | margin-top: -1.4em; |
| 204 | margin-left: -1.4em; |
| 205 | border-radius: 50%; } |
| 206 | @media only screen and (max-device-width: 600px) { |
| 207 | .sy-controls { |
| 208 | display: block; } |
| 209 | .sy-controls li { |
| 210 | min-width: 2.1em; } |
| 211 | .sy-controls li a:after { |
| 212 | width: 1.4em; |
| 213 | height: 1.4em; |
| 214 | margin-top: -0.7em; |
| 215 | margin-left: -0.7em; } } |
| 216 | |
| 217 | /* captions, styled fo the overlay variant */ |
| 218 | .sy-caption-wrap { |
| 219 | position: absolute; |
| 220 | bottom: 2em; |
| 221 | z-index: 12; |
| 222 | left: 50%; } |
| 223 | .sy-caption-wrap .sy-caption { |
| 224 | position: relative; |
| 225 | left: -50%; |
| 226 | background-color: rgba(0, 0, 0, 0.54); |
| 227 | color: #fff; |
| 228 | padding: 0.4em 1em; |
| 229 | border-radius: 1.2em; } |
| 230 | .sy-caption-wrap .sy-caption a:link, .sy-caption-wrap .sy-caption a:visited { |
| 231 | color: #e24b70; |
| 232 | font-weight: 600; |
| 233 | text-decoration: none; } |
| 234 | .sy-caption-wrap .sy-caption a:hover, .sy-caption-wrap .sy-caption a:focus { |
| 235 | text-decoration: underline; } |
| 236 | @media only screen and (max-device-width: 600px), screen and (max-width: 600px) { |
| 237 | .sy-caption-wrap { |
| 238 | left: 0; |
| 239 | bottom: 0.4em; } |
| 240 | .sy-caption-wrap .sy-caption { |
| 241 | left: 0; |
| 242 | padding: 0.2em 0.4em; |
| 243 | font-size: 0.92em; |
| 244 | border-radius: 0; } } |
| 245 | |
| 246 | /* pager bubbles */ |
| 247 | .sy-pager { |
| 248 | clear: both; |
| 249 | display: block; |
| 250 | width: 100%; |
| 251 | margin: 1em 0 0; |
| 252 | padding: 0; |
| 253 | list-style: none; |
| 254 | text-align: center; } |
| 255 | .sy-pager li { |
| 256 | display: inline-block; |
| 257 | width: 1.2em; |
| 258 | height: 1.2em; |
| 259 | margin: 0 1em 0 0; |
| 260 | border-radius: 50%; } |
| 261 | .sy-pager li.sy-active a { |
| 262 | background-color: #e24b70; } |
| 263 | .sy-pager li a { |
| 264 | width: 100%; |
| 265 | height: 100%; |
| 266 | display: block; |
| 267 | background-color: #ccc; |
| 268 | text-indent: -9999px; |
| 269 | -webkit-background-size: 2em 2em; |
| 270 | background-size: 2em; |
| 271 | border-radius: 50%; |
| 272 | text-decoration: none; |
| 273 | box-shadow: none; } |
| 274 | .sy-pager li a:link, .sy-pager li a:visited { |
| 275 | opacity: 1.0; } |
| 276 | .sy-pager li a:hover, .sy-pager li a:focus { |
| 277 | opacity: 0.6; } |
| 278 | |
| 279 | /* element to "keep/ fill" the space of the content, gets intrinsic height via js */ |
| 280 | .sy-filler { |
| 281 | width: 100%; } |
| 282 | .sy-filler.ready { |
| 283 | -webkit-transition: padding 600ms ease; |
| 284 | -o-transition: padding 600ms ease; |
| 285 | transition: padding 600ms ease; } |
| 286 |