پیشنمایش زنده
کد HTML
<button class="facebook-button">
<div class="svg-wrapper-1">
<div class="svg-wrapper">
<svg
viewBox="0 0 320 512"
height="1.2em"
fill="currentColor"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M279.14 288l14.22-92.66h-88.91v-60.13c0-25.35 12.42-50.06 52.24-50.06h40.42V6.26S260.43 0 225.36 0c-73.22 0-121.08 44.38-121.08 124.72v70.62H22.89V288h81.39v224h100.17V288z"
></path>
</svg>
<i class="fa-brands fa-facebook"></i>
</div>
</div>
<span>Watch on Facebook</span>
</button>
کد CSS
button.facebook-button {
font-family: inherit;
font-size: 18px;
background: linear-gradient(to bottom, #0d36b3 0%, #0063ad 100%);
color: white;
padding: 0.8em 1.2em;
display: flex;
align-items: center;
justify-content: center;
border: none;
border-radius: 25px;
box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.2);
transition: all 0.3s;
width: 15em;
height: 2.5em;
}
button.facebook-button:hover {
transform: translateY(-3px);
box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.3);
}
button.facebook-button:active {
transform: scale(0.95);
box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
}
button.facebook-button span {
display: block;
margin-left: 0.4em;
transition: all 0.3s;
}
button.facebook-button svg {
width: 18px;
height: 18px;
fill: white;
transition: all 0.3s;
}
button.facebook-button .svg-wrapper {
display: flex;
align-items: center;
justify-content: center;
width: 30px;
height: 30px;
border-radius: 50%;
background-color: rgba(255, 255, 255, 0.2);
margin-right: 0.5em;
transition: all 0.3s;
}
button.facebook-button:hover svg {
transform: rotate(90deg);
}