پیشنمایش زنده
کد HTML
<div class="light-button">
<button class="bt">
<div class="light-holder">
<div class="dot"></div>
<div class="light"></div>
</div>
<div class="button-holder">
<svg id="skull" height="35" width="35" xmlns="http://www.w3.org/2000/svg">
<path
d="M16 0C6 0 2 4 2 14v8l4 2v6h20v-6l4-2v-8C30 4 26 0 16 0M9 12a4.5 4.5 0 0 1 0 9 4.5 4.5 0 0 1 0-9m14 0a4.5 4.5 0 0 1 0 9 4.5 4.5 0 0 1 0-9"
></path>
</svg>
<p>Skull</p>
</div>
</button>
</div>
کد CSS
.light-button button.bt {
position: relative;
height: 200px;
display: flex;
align-items: flex-end;
outline: none;
background: none;
border: none;
cursor: pointer;
}
.light-button button.bt .button-holder {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100px;
width: 100px;
background-color: #0a0a0a;
border-radius: 5px;
color: #0f0f0f;
font-weight: 700;
transition: 300ms;
outline: #0f0f0f 2px solid;
outline-offset: 20;
}
.light-button button.bt .button-holder svg {
height: 50px;
fill: #0f0f0f;
transition: 300ms;
}
.light-button button.bt .light-holder {
position: absolute;
height: 200px;
width: 100px;
display: flex;
flex-direction: column;
align-items: center;
}
.light-button button.bt .light-holder .dot {
position: absolute;
top: 0;
width: 10px;
height: 10px;
background-color: #0a0a0a;
border-radius: 10px;
z-index: 2;
}
.light-button button.bt .light-holder .light {
position: absolute;
top: 0;
width: 200px;
height: 200px;
clip-path: polygon(50% 0%, 25% 100%, 75% 100%);
background: transparent;
}
.light-button button.bt:hover .button-holder svg {
fill: rgb(255, 255, 255);
}
.light-button button.bt:hover .button-holder {
color: rgb(255, 255, 255);
outline: rgb(255, 255, 255) 2px solid;
outline-offset: 2px;
}
.light-button button.bt:hover .light-holder .light {
background: rgb(255, 255, 255);
background: linear-gradient(
180deg,
rgb(255, 255, 255) 0%,
rgba(255, 255, 255, 0) 75%,
rgba(255, 255, 255, 0) 100%
);
}