پیشنمایش زنده
کد HTML
<button>
<span class="text">Button</span>
</button>
کد CSS
button {
align-items: center;
background-image: linear-gradient(144deg, #d1ac00, #647723 50%, #004643);
border: 0;
border-radius: 8px;
box-shadow: #d1ac00;
box-sizing: border-box;
color: #ffffff;
display: flex;
font-family: Phantomsans, sans-serif;
font-size: 18px;
justify-content: center;
line-height: 1em;
max-width: 100%;
min-width: 140px;
padding: 3px;
text-decoration: none;
user-select: none;
-webkit-user-select: none;
touch-action: manipulation;
white-space: nowrap;
cursor: pointer;
transition: all 0.3s;
}
button:active,
button:hover {
outline: 0;
}
button span {
background-color: rgb(5, 6, 45);
padding: 16px 24px;
border-radius: 6px;
width: 100%;
height: 100%;
transition: 300ms;
}
button:hover span {
background: none;
}
button:active {
transform: scale(0.9);
}