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
| .success { width: 100%; height:100%; background-color: rgba(0,0,0,.3); position: fixed; left:0; top:0; z-index: 999; display: none; padding-bottom: 30%; } .success.current { display: flex; flex-direction: column; align-items: center; justify-content: center; } .success .box { width: 5rem; height:5rem; background: white; border-radius: 0.2rem; } .success .txt { opacity: 0; transform: translateY(0.3rem); } .success i { width: .42rem; height:.42rem; position: absolute; right:.25rem; top:.25rem; background: url(../images/close.png) no-repeat; background-size: 100% auto; opacity: 0; } .done { width: 50px; height: 50px; border-radius: 50%; display: block; stroke-width: 2; stroke: #fff; stroke-miterlimit: 10; margin: 20px auto; box-shadow: inset 0px 0px 0px #7ac142; } .done .circle { stroke-dasharray: 166; stroke-dashoffset: 166; stroke-width: 2; stroke-miterlimit: 10; stroke: #7ac142; fill: none; } .done .check { transform-origin: 50% 50%; stroke-dasharray: 48; stroke-dashoffset: 48; } .current .done { animation: fill-green 0.5s ease-in-out 0.5s forwards, scale 0.3s ease-in-out 0.7s both; } .current .done .circle { animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards; } .current .done .check { animation: stroke 0.7s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards; } .current.success .txt { animation: txt 1s ease 0.8s forwards; } .current.success i { animation: txt 1s ease 0.8s forwards; } @keyframes txt { 100% { opacity: 1; transform: translateY(0); } } @keyframes stroke { 100% { stroke-dashoffset: 0; } } @keyframes scale { 0%, 100% { transform: none; } 50% { transform: scale3d(1.2, 1.2, 1); } 80% { transform: scale3d(0.8, 0.8, 1); } } @keyframes fill-green { 100% { box-shadow: inset 0px 0px 0px 25px #7ac142; } } @keyframes fill-red { 100% { box-shadow: inset 0px 0px 0px 25px #e74c3c; } }
|