Button by mayurd8862
#212121
1.Btn { 2 position: relative; 3 background-color: transparent; 4 border: none; 5 width: 100px; 6 height: 40px; 7 border-radius: 5px; 8 cursor: pointer; 9 transition: all .3s; 10} 11 12.text { 13 width: 100%; 14 height: 100%; 15 background-color: rgba(230, 230, 230, 0.466); 16 border: none; 17 border-radius: 7px; 18 backdrop-filter: blur(5px); 19 color: rgb(26, 26, 26); 20 display: flex; 21 font-weight: 600; 22 align-items: center; 23 justify-content: center; 24 letter-spacing: 0.8px; 25} 26 27.BG { 28 position: absolute; 29 content: ""; 30 width: 100%; 31 height: 100%; 32 background-image: linear-gradient(147deg, 33 #8b04e5,#dcea1e); 34 z-index: -1; 35 left: 6px; 36 top: 6px; 37 border-radius: 7px; 38 pointer-events: none; 39 transition: all .3s; 40} 41 42.Btn:hover { 43 transform: translateY(-2px); 44} 45 46.Btn:hover .BG { 47 transform: translateY(-1px); 48}
474 views
Variation of abutton
MIT License