CSSAdd prefixes
1.space-button { 2 display: inline-block; 3 background-color: #111; 4 color: #fff; 5 border: none; 6 border-radius: 30px; 7 padding: 12px 32px; 8 font-size: 1.2em; 9 font-weight: bold; 10 text-transform: uppercase; 11 letter-spacing: 2px; 12 position: relative; 13 overflow: hidden; 14 cursor: pointer; 15 transition: background-color 0.3s ease; 16} 17 18.space-button span { 19 position: relative; 20 z-index: 1; 21} 22 23.space-button svg { 24 position: absolute; 25 top: 50%; 26 right: 12px; 27 transform: translateY(-50%); 28 width: 16px; 29 height: 16px; 30 fill: #fff; 31 transition: transform 0.3s ease; 32} 33 34.space-button:hover { 35 background-color: #f8f8f8; 36 color: #111; 37} 38 39.space-button:hover svg { 40 transform: translateX(4px); 41} 42 43.space-button:active { 44 background-color: #f94b4c; 45 color: #fff; 46} 47
HTML
1<button class="space-button"> 2 <span>Explore space</span> 3 <svg viewBox="0 0 24 24"> 4 <path d="M5.5 16.5l5-5-5-5"></path> 5 <path d="M11 11h8v2h-8z"></path> 6 <path d="M16.5 7.5l5-5-5-5"></path> 7 <path d="M19 4v8h-2v-8z"></path> 8 </svg> 9</button> 10
