CSSAdd prefixes
1button { 2 display: flex; 3 align-items: center; 4 padding: .7em 1em; 5 border-radius: 50px; 6 font-family: 'Courier New', Courier, monospace; 7 font-weight: bold; 8 text-transform: uppercase; 9 letter-spacing: 2px; 10 font-size: 16px; 11 text-shadow: 1px 1px 1px rgba(0,212,255, 0.7); 12 color: white; 13 -webkit-transition: .8s; 14 transition: 1s; 15 -webkit-box-shadow: rgba(0,212,255) 0px 0px 50px -15px; 16 box-shadow: rgba(0,212,255) 0px 0px 50px -15px; 17 background: linear-gradient(14deg, rgba(2,0,36, 0.8) 0%, rgba(9,9,121,0.7) 66%, rgba(0,212,255,1) 100%), radial-gradient(circle, rgba(2,0,36, 0.5) 0%, rgba(60,9,121, 0.2) 65%, rgba(0,212,255, 0.9) 100%); 18} 19 20svg { 21 margin-left: 8px; 22 position: relative; 23} 24 25button:hover { 26 -webkit-box-shadow: #222222 0px 0px 4px -2px; 27 box-shadow: #222222 0px 0px 4px -2px; 28} 29 30button:hover svg { 31 -webkit-animation: minibounce .1s infinite alternate; 32 animation: minibounce .1s infinite alternate; 33} 34 35.planet { 36 position: relative; 37 top: -42px; 38} 39 40button:focus { 41 -webkit-animation: shadow 5s; 42 animation: shadow 5s; 43} 44 45button:focus svg { 46 -webkit-animation: launch 2s ease-in-out, fadeOut 2.3s; 47 animation: launch 2s ease-in-out, fadeOut 2.3s; 48} 49 50@-webkit-keyframes minibounce { 51 from { 52 -webkit-transform: translate(-2px, 3px); 53 transform: translate(-2px, 3px); 54 } 55} 56 57@keyframes minibounce { 58 from { 59 -webkit-transform: translate(-2px, 3px); 60 transform: translate(-2px, 3px); 61 } 62} 63 64@-webkit-keyframes launch { 65 from { 66 top: 0%; 67 left: 0%; 68 } 69 70 to { 71 top: 42%; 72 left: 75%; 73 } 74} 75 76@keyframes launch { 77 from { 78 top: 0px; 79 left: 0px; 80 } 81 82 to { 83 top: -40px; 84 left: 60px; 85 } 86} 87 88@-webkit-keyframes fadeOut { 89 0% { 90 opacity: 1; 91 } 92 93 40% { 94 opacity: 1; 95 } 96 97 80% { 98 opacity: 0; 99 } 100 101 90% { 102 opacity: 0; 103 } 104} 105 106@keyframes fadeOut { 107 0% { 108 opacity: 1; 109 } 110 111 40% { 112 opacity: 1; 113 } 114 115 80% { 116 opacity: 0; 117 } 118 119 90% { 120 opacity: 0; 121 } 122} 123 124@-webkit-keyframes shadow { 125 from { 126 -webkit-box-shadow: #222222 0px 0px 4px -2px; 127 box-shadow: #222222 0px 0px 4px -2px; 128 } 129 130 to { 131 -webkit-box-shadow: #51eafd 0px 0px 50px -15px; 132 box-shadow: #51eafd 0px 0px 50px -15px; 133 } 134} 135 136@keyframes shadow { 137 from { 138 -webkit-box-shadow: #222222 0px 0px 4px -2px; 139 box-shadow: #222222 0px 0px 4px -2px; 140 } 141 142 to { 143 -webkit-box-shadow: #51eafd 0px 0px 50px -15px; 144 box-shadow: #51eafd 0px 0px 50px -15px; 145 } 146} 147
HTML
1<button> 2 <span class="text">Go to space!</span> 3 <svg xmlns="http://www.w3.org/2000/svg" id="rocket" version="1.1" fill="none" stroke="currentColor" viewBox="0 0 15 15" height="24px" width="24px"> 4 <path d="M12.5547,1c-2.1441,0-5.0211,1.471-6.9531,4H4 5 C2.8427,5,2.1794,5.8638,1.7227,6.7773L1.1113,8h1.4434H4l1.5,1.5L7,11v1.4453v1.4434l1.2227-0.6113 6 C9.1362,12.8206,10,12.1573,10,11V9.3984c2.529-1.932,4-4.809,4-6.9531V1H12.5547z M10,4c0.5523,0,1,0.4477,1,1l0,0 7 c0,0.5523-0.4477,1-1,1l0,0C9.4477,6,9,5.5523,9,5v0C9,4.4477,9.4477,4,10,4L10,4z M3.5,10L3,10.5C2.2778,11.2222,2,13,2,13 8 s1.698-0.198,2.5-1L5,11.5L3.5,10z" id="path7143"></path> 9</svg> 10</button> 11<div class="planet"> 12 <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" height="28px" width="28px"> 13<circle stroke-linejoin="round" stroke-linecap="round" stroke-width="2" stroke="#fff" r="8" cy="12" cx="12"></circle> 14<path stroke-linejoin="round" stroke-linecap="round" stroke-width="2" stroke="#fff" d="M8.39864 4.84867C5.37158 2.58215 2.97238 1.48892 2.23065 2.23065C1.05676 3.40454 4.47902 8.73006 9.87448 14.1255C15.2699 19.521 20.5955 22.9432 21.7693 21.7693C22.2003 21.3384 22.0118 20.348 21.3337 19"></path> 15</svg> 16</div> 17
