پیشنمایش زنده
کد HTML
<button class="button-name" role="button">Button-name</button>
کد CSS
.button-name {
align-items: center;
appearance: none;
background-color: #fcfcfd;
border-radius: 4px;
border-width: 0;
box-shadow:
rgba(45, 35, 66, 0.2) 0 2px 4px,
rgba(45, 35, 66, 0.15) 0 7px 13px -3px,
#d6d6e7 0 -3px 0 inset;
box-sizing: border-box;
color: #36395a;
cursor: pointer;
display: inline-flex;
height: 48px;
justify-content: center;
line-height: 1;
list-style: none;
overflow: hidden;
padding-left: 16px;
padding-right: 16px;
position: relative;
text-align: left;
text-decoration: none;
transition:
box-shadow 0.15s,
transform 0.15s;
user-select: none;
-webkit-user-select: none;
touch-action: manipulation;
white-space: nowrap;
will-change: box-shadow, transform;
font-size: 18px;
}
.button-name:focus {
box-shadow:
#d6d6e7 0 0 0 1.5px inset,
rgba(45, 35, 66, 0.4) 0 2px 4px,
rgba(45, 35, 66, 0.3) 0 7px 13px -3px,
#d6d6e7 0 -3px 0 inset;
}
.button-name:hover {
box-shadow:
rgba(45, 35, 66, 0.3) 0 4px 8px,
rgba(45, 35, 66, 0.2) 0 7px 13px -3px,
#d6d6e7 0 -3px 0 inset;
transform: translateY(-2px);
}
.button-name:active {
box-shadow: #d6d6e7 0 3px 7px inset;
transform: translateY(2px);
}