logo

01 Jan 2022

HTML & CSS:

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 <style> *{ margin: 0; padding: 0; } .main{ width: 100%; height: 100vh; display: flex; justify-content: center; align-items: center; background: #f05454; } .btn{ width: 150px; height: 40px; font-size: 1.1rem; font-weight: 700; font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif; cursor: pointer; outline: none; border: none; transform: rotate(-30deg) skewX(25deg) translate(0,0); box-shadow: -10px 10px 10px rgba(0, 0, 0, 0.5); background: #e76f6f; color: white; transition: all 0.4s; position: relative; } .btn::before{ content: ''; position: absolute; top: 5px; left: -10px; width: 10px; height: 100%; background: #795a5a; transform: rotate(0deg) skewY(-45deg); } .btn::after{ content: ''; position: absolute; top: 40px; left: -5px; width: 150px; height: 10px; background: #795a5a; transform: rotate(0deg) skewX(-45deg); } .btn:hover{ transform: rotate(-30deg) skewX(25deg) translate(20px,-20px); box-shadow: -30px 30px 10px rgba(0, 0, 0, 0.5); } </style> <div class="main"> <button class="btn">SUBSCRIBE</button> </div>