How we can create a download button animation using pure CSS? Solution: See this CSS Animated Download Button With Progress Bar and Icons, Pure CSS Program.
Previously I have shared a submit button program, this is similar to that but it is a pure CSS program. Basically, a download button we place on the website to the users can download any file. A basic button just redirects the user to the file location or starts downloading directly. But many websites use modern and stylish buttons in the download section, for an attractive design and user experience.
Today you will learn to create a pure CSS download button animation. Basically, there is a download button with icon, it has a cool hover effect and when you will click it there will an expanding click effect appear. After clicking the button, you will see a progress bar and an icon with downloading text. When the progress bar will fill fully than a circle will appear with dashed stroke lines and a tick icon animation will place in center of the circle.
So, Today I am sharing CSS Animated Download Button With Progress Bar and Icons. There I have used HTML to creating the layout and elements, using pure CSS for styling and functioning. This is a pure CSS program there I have not used JS or any JS library. You can use this download button animation on your website, also you can integrate the downloading percentage to the progress bar.
If you are thinking now how this download button actually is, then see the preview given below.
Preview Of Pure CSS Downloading Animation
See this video preview to getting an idea of how this animated download button looks like.
Now you can see this program visually, also you can see it live by pressing the button given above. If you like this, then get the source code of its.
You May Also Like:
- Text Underline Hover Effect
- Minimal Checkbox with SVG Tick
- Border Transition Effects
- Popup Subscription Form
CSS Animated Download Button With Progress Bar Source Code
Before sharing source code, let’s talk about it. First I have created the main div with class name container and placed all elements inside it. Inside the main div, I have created a checkbox input to create the click function. And I have placed a label for the input, inside the label I have placed left all elements. I have placed a span with icon and text to create the download button, another span to show downloading progress, two I tags for download and tick icons, and many divs with the same class name to creating the dashed circle.
Now using CSS I have placed all the items in the right place, as you can see in the preview. With CSS first I gave basic values like size, position, margin, padding, etc to the elements. There I have used CSS @keyframe command to create the animation effects and used cubic-bezier command to define the curve of animation. I have used :nth-of-type command to select point divs and gave values separately. Also I used transform command for animation or transformation.
Left all other things you will understand after getting the codes, I can’t explain all in writing. For creating this program you have to create only 2 files, first for HTML and second for CSS. Follow the steps to creating this program without any error.
index.html
Create an HTML file named ‘index.html‘ and put these codes given below.
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 |
<!DOCTYPE html> <!-- Code By Webdevtrick ( https://webdevtrick.com ) --> <html lang="en" > <head> <meta charset="UTF-8"> <title>Download Button With Progress | Webdevtrick.com</title> <link rel='stylesheet' href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> <link rel="stylesheet" href="style.css"> </head> <body> <div class='container'> <input id='funky' type='checkbox'> <label for='funky'> <div class='download_button'> <span><i class="icon fa fa-download"></i> <span>Download</span></span> <span class="downloading">Downloading</span> <i class="icon d_icon fa fa-cloud-download"></i> <i class="icon complete fa fa-check"></i> <div class='point'></div> <div class='point'></div> <div class='point'></div> <div class='point'></div> <div class='point'></div> <div class='point'></div> <div class='point'></div> <div class='point'></div> <div class='point'></div> <div class='point'></div> <div class='point'></div> <div class='point'></div> <div class='point'></div> <div class='point'></div> <div class='point'></div> <div class='point'></div> <div class='point'></div> <div class='point'></div> <div class='point'></div> <div class='point'></div> <div class='point'></div> <div class='point'></div> <div class='point'></div> <div class='point'></div> <div class='point'></div> <div class='point'></div> <div class='point'></div> <div class='point'></div> <div class='point'></div> <div class='point'></div> <div class='point'></div> <div class='point'></div> <div class='point'></div> <div class='point'></div> <div class='point'></div> <div class='point'></div> <div class='download_button__bar'></div> </div> </label> </div> </body> </html> |
style.css
Now create a CSS file named ‘style.css‘ and put these codes given here.
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 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 |
/* Code By Webdevtrick ( https://webdevtrick.com ) */ @import url(https://fonts.googleapis.com/css?family=Nunito:400,700,300); * { box-sizing: border-box; -webkit-touch-callout: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } body { font-family: 'Nunito', sans-serif; background: #2C363F; } .container { position: absolute; left: 0; right: 0; top: 50%; -webkit-transform: translateY(-50%); transform: translateY(-50%); width: 660px; margin: auto; } .container a { color: #FF3636; } .download_button { border: 2px solid #FF3636; width: 200px; text-align: center; height: 48px; padding: 2px 4px; border-radius: 100px; color: white; margin: 0 auto; -webkit-transition: all .3s; transition: all .3s; position: relative; z-index: 3; line-height: 42px; text-transform: uppercase; font-weight: 700; font-size: 14px; } .download_button:hover { box-shadow: 0px 0px 0px 6px rgba(0, 0, 0, 0.2); background: #FF3636; } .download_button:hover span i { margin-right: 10px; } .download_button:active { box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0.2); } .download_button__bar { width: 0%; position: absolute; height: 8px; top: 4px; border-radius: 100px; background: -webkit-linear-gradient(left, #FF3636 0%, #e60023 100%); } .container input { display: none; } .container input:checked + label .download_button span span { opacity: 0; left: 40px; } .container input:checked + label .download_button span i { opacity: 0; left: -40px; } input:checked + label .download_button { -webkit-animation: base 0.96s 0.12s cubic-bezier(0.755, -0.245, 0.175, 1) forwards, pulse 0.5s forwards, final 0.3s 3.6s forwards; animation: base 0.96s 0.12s cubic-bezier(0.755, -0.245, 0.175, 1) forwards, pulse 0.5s forwards, final 0.3s 3.6s forwards; } input:checked + label .download_button .downloading { -webkit-animation: pop .2s 1s forwards,popout .2s 3.4s forwards; animation: pop .2s 1s forwards,popout .2s 3.4s forwards; } input:checked + label .download_button .d_icon { -webkit-animation: d_icon .6s 1s forwards,wobble .4s 3.58s forwards,iconout .14s 4.45s forwards; animation: d_icon .6s 1s forwards,wobble .4s 3.58s forwards,iconout .14s 4.45s forwards; } input:checked + label .download_button .complete { -webkit-animation: d_icon .14s 4.55s forwards; animation: d_icon .14s 4.55s forwards; } input:checked + label .download_button .point:nth-of-type(1) { -webkit-animation: dot 0.14s 4.0038461538s forwards; animation: dot 0.14s 4.0038461538s forwards; } input:checked + label .download_button .point:nth-of-type(2) { -webkit-animation: dot 0.14s 4.0076923077s forwards; animation: dot 0.14s 4.0076923077s forwards; } input:checked + label .download_button .point:nth-of-type(3) { -webkit-animation: dot 0.14s 4.0115384615s forwards; animation: dot 0.14s 4.0115384615s forwards; } input:checked + label .download_button .point:nth-of-type(4) { -webkit-animation: dot 0.14s 4.0153846154s forwards; animation: dot 0.14s 4.0153846154s forwards; } input:checked + label .download_button .point:nth-of-type(5) { -webkit-animation: dot 0.14s 4.0192307692s forwards; animation: dot 0.14s 4.0192307692s forwards; } input:checked + label .download_button .point:nth-of-type(6) { -webkit-animation: dot 0.14s 4.0230769231s forwards; animation: dot 0.14s 4.0230769231s forwards; } input:checked + label .download_button .point:nth-of-type(7) { -webkit-animation: dot 0.14s 4.0269230769s forwards; animation: dot 0.14s 4.0269230769s forwards; } input:checked + label .download_button .point:nth-of-type(8) { -webkit-animation: dot 0.14s 4.0307692308s forwards; animation: dot 0.14s 4.0307692308s forwards; } input:checked + label .download_button .point:nth-of-type(9) { -webkit-animation: dot 0.14s 4.0346153846s forwards; animation: dot 0.14s 4.0346153846s forwards; } input:checked + label .download_button .point:nth-of-type(10) { -webkit-animation: dot 0.14s 4.0384615385s forwards; animation: dot 0.14s 4.0384615385s forwards; } input:checked + label .download_button .point:nth-of-type(11) { -webkit-animation: dot 0.14s 4.0423076923s forwards; animation: dot 0.14s 4.0423076923s forwards; } input:checked + label .download_button .point:nth-of-type(12) { -webkit-animation: dot 0.14s 4.0461538462s forwards; animation: dot 0.14s 4.0461538462s forwards; } input:checked + label .download_button .point:nth-of-type(13) { -webkit-animation: dot 0.14s 4.05s forwards; animation: dot 0.14s 4.05s forwards; } input:checked + label .download_button .point:nth-of-type(14) { -webkit-animation: dot 0.14s 4.0538461538s forwards; animation: dot 0.14s 4.0538461538s forwards; } input:checked + label .download_button .point:nth-of-type(15) { -webkit-animation: dot 0.14s 4.0576923077s forwards; animation: dot 0.14s 4.0576923077s forwards; } input:checked + label .download_button .point:nth-of-type(16) { -webkit-animation: dot 0.14s 4.0615384615s forwards; animation: dot 0.14s 4.0615384615s forwards; } input:checked + label .download_button .point:nth-of-type(17) { -webkit-animation: dot 0.14s 4.0653846154s forwards; animation: dot 0.14s 4.0653846154s forwards; } input:checked + label .download_button .point:nth-of-type(18) { -webkit-animation: dot 0.14s 4.0692307692s forwards; animation: dot 0.14s 4.0692307692s forwards; } input:checked + label .download_button .point:nth-of-type(19) { -webkit-animation: dot 0.14s 4.0730769231s forwards; animation: dot 0.14s 4.0730769231s forwards; } input:checked + label .download_button .point:nth-of-type(20) { -webkit-animation: dot 0.14s 4.0769230769s forwards; animation: dot 0.14s 4.0769230769s forwards; } input:checked + label .download_button .point:nth-of-type(21) { -webkit-animation: dot 0.14s 4.0807692308s forwards; animation: dot 0.14s 4.0807692308s forwards; } input:checked + label .download_button .point:nth-of-type(22) { -webkit-animation: dot 0.14s 4.0846153846s forwards; animation: dot 0.14s 4.0846153846s forwards; } input:checked + label .download_button .point:nth-of-type(23) { -webkit-animation: dot 0.14s 4.0884615385s forwards; animation: dot 0.14s 4.0884615385s forwards; } input:checked + label .download_button .point:nth-of-type(24) { -webkit-animation: dot 0.14s 4.0923076923s forwards; animation: dot 0.14s 4.0923076923s forwards; } input:checked + label .download_button .point:nth-of-type(25) { -webkit-animation: dot 0.14s 4.0961538462s forwards; animation: dot 0.14s 4.0961538462s forwards; } input:checked + label .download_button .point:nth-of-type(26) { -webkit-animation: dot 0.14s 4.1s forwards; animation: dot 0.14s 4.1s forwards; } input:checked + label .download_button .point:nth-of-type(27) { -webkit-animation: dot 0.14s 4.1038461538s forwards; animation: dot 0.14s 4.1038461538s forwards; } input:checked + label .download_button .point:nth-of-type(28) { -webkit-animation: dot 0.14s 4.1076923077s forwards; animation: dot 0.14s 4.1076923077s forwards; } input:checked + label .download_button .point:nth-of-type(29) { -webkit-animation: dot 0.14s 4.1115384615s forwards; animation: dot 0.14s 4.1115384615s forwards; } input:checked + label .download_button .point:nth-of-type(30) { -webkit-animation: dot 0.14s 4.1153846154s forwards; animation: dot 0.14s 4.1153846154s forwards; } input:checked + label .download_button .point:nth-of-type(31) { -webkit-animation: dot 0.14s 4.1192307692s forwards; animation: dot 0.14s 4.1192307692s forwards; } input:checked + label .download_button .point:nth-of-type(32) { -webkit-animation: dot 0.14s 4.1230769231s forwards; animation: dot 0.14s 4.1230769231s forwards; } input:checked + label .download_button .point:nth-of-type(33) { -webkit-animation: dot 0.14s 4.1269230769s forwards; animation: dot 0.14s 4.1269230769s forwards; } input:checked + label .download_button .point:nth-of-type(34) { -webkit-animation: dot 0.14s 4.1307692308s forwards; animation: dot 0.14s 4.1307692308s forwards; } input:checked + label .download_button .point:nth-of-type(35) { -webkit-animation: dot 0.14s 4.1346153846s forwards; animation: dot 0.14s 4.1346153846s forwards; } input:checked + label .download_button .point:nth-of-type(36) { -webkit-animation: dot 0.14s 4.1384615385s forwards; animation: dot 0.14s 4.1384615385s forwards; } input:checked + label .download_button:hover { box-shadow: none; } input:checked + label .download_button__bar { -webkit-animation: bar 2.6s 1.14s cubic-bezier(0.19, 1, 0.22, 1) forwards, barout 0.3s 3.2s forwards; animation: bar 2.6s 1.14s cubic-bezier(0.19, 1, 0.22, 1) forwards, barout 0.3s 3.2s forwards; } label { cursor: pointer; } label .downloading { position: absolute; left: 0; right: 0; margin: auto; top: 28px; opacity: 0; font-size: 12px; } label .point { opacity: 0; width: 2px; height: 6px; -webkit-transform-origin: 60px 0px; transform-origin: 60px 0px; background: #FF3636; border-radius: 10px; position: absolute; left: -11px; top: 50px; } label .point:nth-of-type(1) { -webkit-transform: rotate(10deg); transform: rotate(10deg); } label .point:nth-of-type(2) { -webkit-transform: rotate(20deg); transform: rotate(20deg); } label .point:nth-of-type(3) { -webkit-transform: rotate(30deg); transform: rotate(30deg); } label .point:nth-of-type(4) { -webkit-transform: rotate(40deg); transform: rotate(40deg); } label .point:nth-of-type(5) { -webkit-transform: rotate(50deg); transform: rotate(50deg); } label .point:nth-of-type(6) { -webkit-transform: rotate(60deg); transform: rotate(60deg); } label .point:nth-of-type(7) { -webkit-transform: rotate(70deg); transform: rotate(70deg); } label .point:nth-of-type(8) { -webkit-transform: rotate(80deg); transform: rotate(80deg); } label .point:nth-of-type(9) { -webkit-transform: rotate(90deg); transform: rotate(90deg); } label .point:nth-of-type(10) { -webkit-transform: rotate(100deg); transform: rotate(100deg); } label .point:nth-of-type(11) { -webkit-transform: rotate(110deg); transform: rotate(110deg); } label .point:nth-of-type(12) { -webkit-transform: rotate(120deg); transform: rotate(120deg); } label .point:nth-of-type(13) { -webkit-transform: rotate(130deg); transform: rotate(130deg); } label .point:nth-of-type(14) { -webkit-transform: rotate(140deg); transform: rotate(140deg); } label .point:nth-of-type(15) { -webkit-transform: rotate(150deg); transform: rotate(150deg); } label .point:nth-of-type(16) { -webkit-transform: rotate(160deg); transform: rotate(160deg); } label .point:nth-of-type(17) { -webkit-transform: rotate(170deg); transform: rotate(170deg); } label .point:nth-of-type(18) { -webkit-transform: rotate(180deg); transform: rotate(180deg); } label .point:nth-of-type(19) { -webkit-transform: rotate(190deg); transform: rotate(190deg); } label .point:nth-of-type(20) { -webkit-transform: rotate(200deg); transform: rotate(200deg); } label .point:nth-of-type(21) { -webkit-transform: rotate(210deg); transform: rotate(210deg); } label .point:nth-of-type(22) { -webkit-transform: rotate(220deg); transform: rotate(220deg); } label .point:nth-of-type(23) { -webkit-transform: rotate(230deg); transform: rotate(230deg); } label .point:nth-of-type(24) { -webkit-transform: rotate(240deg); transform: rotate(240deg); } label .point:nth-of-type(25) { -webkit-transform: rotate(250deg); transform: rotate(250deg); } label .point:nth-of-type(26) { -webkit-transform: rotate(260deg); transform: rotate(260deg); } label .point:nth-of-type(27) { -webkit-transform: rotate(270deg); transform: rotate(270deg); } label .point:nth-of-type(28) { -webkit-transform: rotate(280deg); transform: rotate(280deg); } label .point:nth-of-type(29) { -webkit-transform: rotate(290deg); transform: rotate(290deg); } label .point:nth-of-type(30) { -webkit-transform: rotate(300deg); transform: rotate(300deg); } label .point:nth-of-type(31) { -webkit-transform: rotate(310deg); transform: rotate(310deg); } label .point:nth-of-type(32) { -webkit-transform: rotate(320deg); transform: rotate(320deg); } label .point:nth-of-type(33) { -webkit-transform: rotate(330deg); transform: rotate(330deg); } label .point:nth-of-type(34) { -webkit-transform: rotate(340deg); transform: rotate(340deg); } label .point:nth-of-type(35) { -webkit-transform: rotate(350deg); transform: rotate(350deg); } label .point:nth-of-type(36) { -webkit-transform: rotate(360deg); transform: rotate(360deg); } label .complete { position: absolute; left: 0; right: 0; margin: auto; top: 50%; z-index: 2; -webkit-transform: translateY(-50%) scale(0); transform: translateY(-50%) scale(0); font-size: 32px; } label .d_icon { position: absolute; left: 0; right: 0; margin: auto; top: 50%; z-index: 2; -webkit-transform: translateY(-50%) scale(0); transform: translateY(-50%) scale(0); font-size: 32px; } label span { opacity: 1; -webkit-transition: all .18s; transition: all .18s; position: relative; top: -3px; } label span i { font-size: 22px; margin-right: 6px; position: relative; left: 0; -webkit-transition: all .2s; transition: all .2s; top: 3px; } label span span { left: 0; top: 0px; -webkit-transition: all .2s; transition: all .2s; } label span .large { position: absolute; opacity: 0; -webkit-transition: all .3s .1s; transition: all .3s .1s; left: -59px; top: -21px; font-size: 60px; } @-webkit-keyframes base { 0% { border: none; } 50% { width: 20px; height: 40px; background: #FF3636; height: 16px; border: none; } 75% { background: rgba(0, 0, 0, 0.34); border: none; } 76% { width: 405px; height: 16px; background: rgba(0, 0, 0, 0.34); border: none; } 88% { width: 384px; height: 16px; background: rgba(0, 0, 0, 0.34); border: none; } 100% { width: 400px; height: 16px; background: rgba(0, 0, 0, 0.34); border: none; } } @keyframes base { 0% { border: none; } 50% { width: 20px; height: 40px; background: #FF3636; height: 16px; border: none; } 75% { background: rgba(0, 0, 0, 0.34); border: none; } 76% { width: 405px; height: 16px; background: rgba(0, 0, 0, 0.34); border: none; } 88% { width: 384px; height: 16px; background: rgba(0, 0, 0, 0.34); border: none; } 100% { width: 400px; height: 16px; background: rgba(0, 0, 0, 0.34); border: none; } } @-webkit-keyframes bar { 100% { width: 98%; } } @keyframes bar { 100% { width: 98%; } } @-webkit-keyframes pulse { 0% { box-shadow: 0px 0px 0px 6px rgba(0, 0, 0, 0.08); } 100% { box-shadow: 0px 0px 0px 1920px rgba(0, 0, 0, 0); } } @keyframes pulse { 0% { box-shadow: 0px 0px 0px 6px rgba(0, 0, 0, 0.08); } 100% { box-shadow: 0px 0px 0px 1920px rgba(0, 0, 0, 0); } } @-webkit-keyframes pop { 100% { opacity: 1; top: 23px; } } @keyframes pop { 100% { opacity: 1; top: 23px; } } @-webkit-keyframes popout { 0% { opacity: 1; top: 23px; } 100% { opacity: 0; top: 28px; } } @keyframes popout { 0% { opacity: 1; top: 23px; } 100% { opacity: 0; top: 28px; } } @-webkit-keyframes barout { 100% { opacity: 0; } } @keyframes barout { 100% { opacity: 0; } } @-webkit-keyframes final { 0% { background: rgba(0, 0, 0, 0.34); } 50% { background: rgba(0, 0, 0, 0.34); width: 100px; height: 100px; box-shadow: none; } 100% { width: 100px; height: 100px; background: none; } } @keyframes final { 0% { background: rgba(0, 0, 0, 0.34); } 50% { background: rgba(0, 0, 0, 0.34); width: 100px; height: 100px; box-shadow: none; } 100% { width: 100px; height: 100px; background: none; } } @-webkit-keyframes d_icon { 0% { -webkit-transform: translateY(-50%) scale(0); transform: translateY(-50%) scale(0); } 25% { -webkit-transform: translateY(-50%) scale(1.2); transform: translateY(-50%) scale(1.2); } 50% { -webkit-transform: translateY(-50%) scale(0.9); transform: translateY(-50%) scale(0.9); } 75% { -webkit-transform: translateY(-50%) scale(1.1); transform: translateY(-50%) scale(1.1); } 100% { -webkit-transform: translateY(-50%) scale(1); transform: translateY(-50%) scale(1); } } @keyframes d_icon { 0% { -webkit-transform: translateY(-50%) scale(0); transform: translateY(-50%) scale(0); } 25% { -webkit-transform: translateY(-50%) scale(1.2); transform: translateY(-50%) scale(1.2); } 50% { -webkit-transform: translateY(-50%) scale(0.9); transform: translateY(-50%) scale(0.9); } 75% { -webkit-transform: translateY(-50%) scale(1.1); transform: translateY(-50%) scale(1.1); } 100% { -webkit-transform: translateY(-50%) scale(1); transform: translateY(-50%) scale(1); } } @-webkit-keyframes iconout { 0% { -webkit-transform: translateY(-50%) scale(1); transform: translateY(-50%) scale(1); } 100% { -webkit-transform: translateY(-50%) scale(0); transform: translateY(-50%) scale(0); } } @keyframes iconout { 0% { -webkit-transform: translateY(-50%) scale(1); transform: translateY(-50%) scale(1); } 100% { -webkit-transform: translateY(-50%) scale(0); transform: translateY(-50%) scale(0); } } @-webkit-keyframes dot { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes dot { 0% { opacity: 0; } 100% { opacity: 1; } } @-webkit-keyframes wobble { 0% { -webkit-transform: translateY(-50%) scale(1); transform: translateY(-50%) scale(1); } 25% { -webkit-transform: translateY(-50%) scale(1.2); transform: translateY(-50%) scale(1.2); } 50% { -webkit-transform: translateY(-50%) scale(0.9); transform: translateY(-50%) scale(0.9); } 75% { -webkit-transform: translateY(-50%) scale(1.1); transform: translateY(-50%) scale(1.1); } 100% { -webkit-transform: translateY(-50%) scale(1); transform: translateY(-50%) scale(1); } } @keyframes wobble { 0% { -webkit-transform: translateY(-50%) scale(1); transform: translateY(-50%) scale(1); } 25% { -webkit-transform: translateY(-50%) scale(1.2); transform: translateY(-50%) scale(1.2); } 50% { -webkit-transform: translateY(-50%) scale(0.9); transform: translateY(-50%) scale(0.9); } 75% { -webkit-transform: translateY(-50%) scale(1.1); transform: translateY(-50%) scale(1.1); } 100% { -webkit-transform: translateY(-50%) scale(1); transform: translateY(-50%) scale(1); } } |
That’s It. Now you have successfully created CSS Animated Download Button With Progress Bar and Icons, Pure CSS program. If you have any doubt or question comment down below.
Thanks For Visiting, Keep Visiting.
Super cool CSS. But i have a question. Where do i add the tag for downloading a file?