940 views
CSSAdd prefixes
1button { 2 max-width: 320px; 3 display: flex; 4 overflow: hidden; 5 position: relative; 6 padding: 0.875rem 72px 0.875rem 1.75rem; 7 background-color: #039be5; 8 background-image: linear-gradient(to top right, #039be5,#29b6f6); 9 color: #ffffff; 10 font-size: 15px; 11 line-height: 1.25rem; 12 font-weight: 700; 13 text-align: center; 14 text-transform: uppercase; 15 vertical-align: middle; 16 align-items: center; 17 border-radius: 0.5rem; 18 gap: 0.75rem; 19 box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); 20 border: none; 21 transition: all .6s ease; 22} 23 24button span { 25 background-color: rgb(3 155 229); 26 display: grid; 27 position: absolute; 28 right: 0; 29 place-items: center; 30 width: 3rem; 31 height: 100%; 32} 33 34button span svg { 35 width: 1.5rem; 36 height: 1.5rem; 37} 38 39button:hover { 40 box-shadow: 0 4px 30px rgba(4, 175, 255, .1), 0 2px 30px rgba(11, 158, 255, 0.06); 41}
HTML
1<button> 2 Sign in with Twitter 3 <span> 4 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"> 5 <path fill="#fff" d="M16 3.539a6.839 6.839 0 0 1-1.89.518 3.262 3.262 0 0 0 1.443-1.813 6.555 6.555 0 0 1-2.08.794 3.28 3.28 0 0 0-5.674 2.243c0 .26.022.51.076.748a9.284 9.284 0 0 1-6.761-3.431 3.285 3.285 0 0 0 1.008 4.384A3.24 3.24 0 0 1 .64 6.578v.036a3.295 3.295 0 0 0 2.628 3.223 3.274 3.274 0 0 1-.86.108 2.9 2.9 0 0 1-.621-.056 3.311 3.311 0 0 0 3.065 2.285 6.59 6.59 0 0 1-4.067 1.399c-.269 0-.527-.012-.785-.045A9.234 9.234 0 0 0 5.032 15c6.036 0 9.336-5 9.336-9.334 0-.145-.005-.285-.012-.424A6.544 6.544 0 0 0 16 3.539z"></path> 6</svg> 7 </span> 8</button>