Radial SVG Slider - Слайдер с радиальным эффектом на jQuery
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 |
.cd-radial-slider-wrapper ul, .cd-radial-slider-wrapper li, .cd-radial-slider-wrapper a { margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit; display: block; vertical-align: baseline; list-style; none; box-sizing: border-box; } /* -------------------------------- Slider -------------------------------- */ .cd-radial-slider-wrapper { position: relative; width: 100%; max-width: 1100px; margin: 2em auto; /* hide horizontal scrollbar on IE11 */ overflow: hidden; } .cd-radial-slider > li { position: absolute; top: 0; left: 0; width: 100%; opacity: 0; -webkit-transition: -webkit-transform .2s; transition: -webkit-transform .2s; transition: transform .2s; transition: transform .2s, -webkit-transform .2s; /* hide vertical scrollbar on IE11 */ overflow: hidden; } .cd-radial-slider > li.visible { position: relative; opacity: 1; } .cd-radial-slider > li.is-animating, .cd-radial-slider > li.prev-slide, .cd-radial-slider > li.next-slide { opacity: 1; } .cd-radial-slider > li.is-animating { z-index: 2; } .cd-radial-slider > li.scale-down, .cd-radial-slider > li.move-up { z-index: 3; } .cd-radial-slider > li.move-up { /* class added to the navigation round element when clicked - used to create the click effect */ -webkit-animation: cd-clicked .2s; animation: cd-clicked .2s; } .cd-radial-slider > li.scale-down { /* class added to the navigation round element to create the scale down effect */ -webkit-transform: scale(0); -ms-transform: scale(0); transform: scale(0); } .cd-radial-slider > li.prev-slide image, .cd-radial-slider > li.next-slide image { /* make sure the prev/next round elements are visible */ z-index: 3; } .cd-radial-slider > li.next-slide { /* for the scale-down/click effect - change the transform origin so that it is the center of the navigation round element */ -webkit-transform-origin: 92.14% 50%; -ms-transform-origin: 92.14% 50%; transform-origin: 92.14% 50%; } .cd-radial-slider > li.prev-slide { -webkit-transform-origin: 7.86% 50%; -ms-transform-origin: 7.86% 50%; transform-origin: 7.86% 50%; } .cd-radial-slider .svg-wrapper { position: relative; z-index: 1; /* using padding Hack to fix bug on IE - svg height not properly calculated */ height: 0; padding-bottom: 57.15%; } .cd-radial-slider li.prev-slide .svg-wrapper, .cd-radial-slider li.next-slide .svg-wrapper { /* change its z-index so that it's always below the .cd-radial-slider-content */ z-index: 2; } .cd-radial-slider-wrapper svg { position: absolute; z-index: 1; top: 0; left: 0; width: 100%; height: 100%; } .cd-radial-slider-content { position: absolute; z-index: 3; top: 0; left: 0; height: 100%; width: 100%; opacity: 0; visibility: hidden; -webkit-transform: translateZ(0); transform: translateZ(0); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } .cd-radial-slider-content .wrapper { /* vertically center its content */ display: table; height: 100%; width: 100%; } .cd-radial-slider-content .wrapper > div { display: table-cell; vertical-align: middle; text-align: center; padding: 0 17%; color: #ffffff; } .cd-radial-slider-content h2 { font-size: 2rem; font-family: "Vollkorn", serif; } .cd-radial-slider-content p { font-size: 1.4rem; margin: .6em auto .8em; } .cd-radial-slider-content .cd-btn { display: inline-block; padding: 1em; border: 2px solid #ffffff; color: #ffffff; text-transform: uppercase; letter-spacing: .1em; font-size: 1.2rem; font-weight: bold; } .visible .cd-radial-slider-content { visibility: visible; opacity: 1; } .prev-slide .cd-radial-slider-content { -webkit-transform: translateX(50px); -ms-transform: translateX(50px); transform: translateX(50px); } .next-slide .cd-radial-slider-content { -webkit-transform: translateX(-50px); -ms-transform: translateX(-50px); transform: translateX(-50px); } .content-reveal-left .cd-radial-slider-content, .content-reveal-right .cd-radial-slider-content { /* animate slide content when entering the viewport */ -webkit-animation-delay: .1s; animation-delay: .1s; -webkit-animation-fill-mode: both; animation-fill-mode: both; opacity: 1; visibility: visible; } .content-hide-left .cd-radial-slider-content, .content-hide-right .cd-radial-slider-content { /* animate slide content when leaving the viewport */ opacity: 0; visibility: hidden; } .content-reveal-left .cd-radial-slider-content, .content-reveal-right .cd-radial-slider-content, .content-hide-left .cd-radial-slider-content, .content-hide-right .cd-radial-slider-content { -webkit-animation-duration: .4s; animation-duration: .4s; } .content-reveal-left .cd-radial-slider-content { -webkit-animation-name: cd-reveal-left; animation-name: cd-reveal-left; } .content-reveal-right .cd-radial-slider-content { -webkit-animation-name: cd-reveal-right; animation-name: cd-reveal-right; } .content-hide-left .cd-radial-slider-content { -webkit-animation-name: cd-hide-left; animation-name: cd-hide-left; } .content-hide-right .cd-radial-slider-content { -webkit-animation-name: cd-hide-right; animation-name: cd-hide-right; } @media only screen and (min-width: 1100px) { .cd-radial-slider-content h2 { font-size: 4.4rem; } .cd-radial-slider-content p { font-size: 2rem; margin: 1.2em auto 1.6em; } .cd-radial-slider-content .cd-btn { font-size: 1.6rem; -webkit-transition: background .2s, color .2s; transition: background .2s, color .2s; } .cd-radial-slider-content .cd-btn:hover { background: #ffffff; color: #0a0b15; } } .cd-round-mask { /* wrapper for the svg mask elements */ top: 0; left: 0; pointer-events: none; z-index: 0; } /* -------------------------------- Slider navigation -------------------------------- */ .cd-radial-slider-navigation li { position: absolute; z-index: 6; right: 3.58%; top: 42.5%; height: 15%; width: 8.57%; } .cd-radial-slider-navigation li a { display: block; height: 100%; /* replace text with image */ overflow: hidden; text-indent: 100%; white-space: nowrap; color: transparent; -webkit-transition: -webkit-transform .2s; transition: -webkit-transform .2s; transition: transform .2s; transition: transform .2s, -webkit-transform .2s; } .cd-radial-slider-navigation li a::after { /* arrow icon */ content: ''; position: absolute; left: 50%; top: 50%; bottom: auto; right: auto; -webkit-transform: translateX(-50%) translateY(-50%); -ms-transform: translateX(-50%) translateY(-50%); transform: translateX(-50%) translateY(-50%); height: 16px; width: 16px; background: url(/img/cd-icon-arrows-mini.svg) no-repeat 0 0; } .cd-radial-slider-navigation li a:hover { -webkit-transform: scale(1.1); -ms-transform: scale(1.1); transform: scale(1.1); } .cd-radial-slider-navigation li:last-of-type { left: 3.58%; right: auto; } .cd-radial-slider-navigation li:last-of-type a::after { background-position: -16px 0; } @media only screen and (min-width: 900px) { .cd-radial-slider-navigation li a::after { height: 48px; width: 48px; background-image: url(/img/cd-icon-arrows.svg); } .cd-radial-slider-navigation li:last-of-type a::after { background-position: -48px 0; } } /* -------------------------------- Keyframes -------------------------------- */ @-webkit-keyframes cd-reveal-left { 0% { opacity: 0; visibility: hidden; -webkit-transform: translateX(50px); transform: translateX(50px); } 100% { opacity: 1; visibility: visible; -webkit-transform: translateX(0px); transform: translateX(0px); } } @keyframes cd-reveal-left { 0% { opacity: 0; visibility: hidden; -webkit-transform: translateX(50px); transform: translateX(50px); } 100% { opacity: 1; visibility: visible; -webkit-transform: translateX(0px); transform: translateX(0px); } } @-webkit-keyframes cd-reveal-right { 0% { opacity: 0; visibility: hidden; -webkit-transform: translateX(-50px); transform: translateX(-50px); } 100% { opacity: 1; visibility: visible; -webkit-transform: translateX(0px); transform: translateX(0px); } } @keyframes cd-reveal-right { 0% { opacity: 0; visibility: hidden; -webkit-transform: translateX(-50px); transform: translateX(-50px); } 100% { opacity: 1; visibility: visible; -webkit-transform: translateX(0px); transform: translateX(0px); } } @-webkit-keyframes cd-hide-left { 0% { opacity: 1; visibility: visible; -webkit-transform: translateX(0px); transform: translateX(0px); } 100% { opacity: 0; visibility: hidden; -webkit-transform: translateX(-50px); transform: translateX(-50px); } } @keyframes cd-hide-left { 0% { opacity: 1; visibility: visible; -webkit-transform: translateX(0px); transform: translateX(0px); } 100% { opacity: 0; visibility: hidden; -webkit-transform: translateX(-50px); transform: translateX(-50px); } } @-webkit-keyframes cd-hide-right { 0% { opacity: 1; visibility: visible; -webkit-transform: translateX(0px); transform: translateX(0px); } 100% { opacity: 0; visibility: hidden; -webkit-transform: translateX(50px); transform: translateX(50px); } } @keyframes cd-hide-right { 0% { opacity: 1; visibility: visible; -webkit-transform: translateX(0px); transform: translateX(0px); } 100% { opacity: 0; visibility: hidden; -webkit-transform: translateX(50px); transform: translateX(50px); } } @-webkit-keyframes cd-clicked { 0%, 100% { -webkit-transform: scale(1); transform: scale(1); } 50% { -webkit-transform: scale(0.9); transform: scale(0.9); } } @keyframes cd-clicked { 0%, 100% { -webkit-transform: scale(1); transform: scale(1); } 50% { -webkit-transform: scale(0.9); transform: scale(0.9); } } |
1 2 |
<script src='/js/snap.svg-min.js'></script> <script src='/js/main3.js'></script> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
<div class="cd-radial-slider-wrapper"> <ul class="cd-radial-slider" data-radius1="60" data-radius2="1364" data-centerx1="110" data-centerx2="1290"> <li class="visible"> <div class="svg-wrapper"> <svg viewBox="0 0 1400 800"> <title>Animated SVG</title> <defs> <clipPath id="cd-image-1"> <circle id="cd-circle-1" cx="110" cy="400" r="1364"/> </clipPath> </defs> <image height='800px' width="1400px" clip-path="url(#cd-image-1)" xlink:href="https://imapo.ru/img/img-1.jpg"></image> </svg> </div> <!-- .svg-wrapper --> <div class="cd-radial-slider-content"> <div class="wrapper"> <div> <h2>Slide #1 Title</h2> <p>Lorem ipsum dolor sit amet, consectetur.</p> <a href="#0" class="cd-btn">Learn More</a> </div> </div> </div> <!-- .cd-radial-slider-content --> </li> <li class="next-slide"> <div class="svg-wrapper"> <svg viewBox="0 0 1400 800"> <title>Animated SVG</title> <defs> <clipPath id="cd-image-2"> <circle id="cd-circle-2" cx="1290" cy="400" r="60"/> </clipPath> </defs> <image height='800px' width="1400px" clip-path="url(#cd-image-2)" xlink:href="https://imapo.ru/img/img-2.jpg"></image> </svg> </div> <!-- .svg-wrapper --> <div class="cd-radial-slider-content"> <div class="wrapper"> <div> <h2>Slide #2 Title</h2> <p>Lorem ipsum dolor sit amet, consectetur.</p> <a href="#0" class="cd-btn">Learn More</a> </div> </div> </div> <!-- .cd-radial-slider-content --> </li> <li> <div class="svg-wrapper"> <svg viewBox="0 0 1400 800"> <title>Animated SVG</title> <defs> <clipPath id="cd-image-3"> <circle id="cd-circle-3" cx="110" cy="400" r="60"/> </clipPath> </defs> <image height='800px' width="1400px" clip-path="url(#cd-image-3)" xlink:href="/img/img-3.jpg"></image> </svg> </div> <!-- .svg-wrapper --> <div class="cd-radial-slider-content"> <div class="wrapper"> <div> <h2>Slide #3 Title</h2> <p>Lorem ipsum dolor sit amet, consectetur.</p> <a href="#0" class="cd-btn">Learn More</a> </div> </div> </div> <!-- .cd-radial-slider-content --> </li> <li class="prev-slide"> <div class="svg-wrapper"> <svg viewBox="0 0 1400 800"> <title>Animated SVG</title> <defs> <clipPath id="cd-image-4"> <circle id="cd-circle-4" cx="110" cy="400" r="60"/> </clipPath> </defs> <image height='800px' width="1400px" clip-path="url(#cd-image-4)" xlink:href="/img/img-4.jpg"></image> </svg> </div> <div class="cd-radial-slider-content"> <div class="wrapper"> <div> <h2>Slide #4 Title</h2> <p>Lorem ipsum dolor sit amet, consectetur.</p> <a href="#0" class="cd-btn">Learn More</a> </div> </div> </div> <!-- .cd-radial-slider-content --> </li> </ul> <!-- .cd-radial-slider --> <ul class="cd-radial-slider-navigation"> <li><a href="#0" class="next">Next</a></li> <li><a href="#0" class="prev">Prev</a></li> </ul> <!-- .cd-radial-slider-navigation --> <div class="cd-round-mask"> <svg viewBox="0 0 1400 800"> <defs> <mask id="cd-left-mask" height='800px' width="1400px" x="0" y="0" maskUnits="userSpaceOnUse"> <path fill="white" d="M0,0v800h1400V0H0z M110,460c-33.137,0-60-26.863-60-60s26.863-60,60-60s60,26.863,60,60S143.137,460,110,460z"/> </mask> <mask id="cd-right-mask" height='800px' width="1400px" x="0" y="0" maskUnits="userSpaceOnUse"> <path fill="white" d="M0,0v800h1400V0H0z M1290,460c-33.137,0-60-26.863-60-60s26.863-60,60-60s60,26.863,60,60S1323.137,460,1290,460z"/> </mask> </defs> </svg> </div> </div> |
Где прикрепленные файлы то??? :'-(
Первый файл: https://cdnjs.cloudflare.com/ajax/libs/snap.svg/0.5.1/snap.svg-min.js
Второй файл: http://imapo.ru/js/main3.js
Третий файл: http://imapo.ru/img/cd-icon-arrows.svg
Надеюсь это все необходимые файлы 😉
Прошу прощения, добавил архив с файлами. Понять не могу, как так получилось, что не прикрепил его...