按钮模版:btn-light-6
2023年6月20日大约 1 分钟
<div class="container">
<button class="btn-light-6"><span>View Room</span></button>
</div>
.container {
display: flex;
justify-content: center;
align-items: center;
background: #fff;
width: 100%;
height: 200px;
}
.btn-light-6 {
position: relative;
width: 120px;
height: 48px;
line-height: 48px;
padding: 0;
color: #fff;
background: linear-gradient(
0deg,
rgba(255, 151, 0, 1) 0%,
rgba(251, 75, 2, 1) 100%
);
transition: all 0.3s ease;
border: none;
cursor: pointer;
}
.btn-light-6 span {
position: relative;
display: block;
width: 100%;
height: 100%;
}
.btn-light-6:before,
.btn-light-6:after {
position: absolute;
content: "";
right: 0;
bottom: 0;
background: rgba(251, 75, 2, 1);
box-shadow: -7px -7px 20px 0px rgba(255, 255, 255, 0.9), -4px -4px 5px 0px
rgba(255, 255, 255, 0.9), 7px 7px 20px 0px rgba(0, 0, 0, 0.2), 4px 4px 5px
0px rgba(0, 0, 0, 0.3);
transition: all 0.3s ease;
}
.btn-light-6:before {
height: 0%;
width: 2px;
}
.btn-light-6:after {
width: 0%;
height: 2px;
}
.btn-light-6:hover {
color: rgba(251, 75, 2, 1);
background: transparent;
}
.btn-light-6:hover:before {
height: 100%;
}
.btn-light-6:hover:after {
width: 100%;
}
.btn-light-6 span:before,
.btn-light-6 span:after {
position: absolute;
content: "";
left: 0;
top: 0;
background: rgba(251, 75, 2, 1);
box-shadow: -7px -7px 20px 0px rgba(255, 255, 255, 0.9), -4px -4px 5px 0px
rgba(255, 255, 255, 0.9), 7px 7px 20px 0px rgba(0, 0, 0, 0.2), 4px 4px 5px
0px rgba(0, 0, 0, 0.3);
transition: all 0.3s ease;
}
.btn-light-6 span:before {
width: 2px;
height: 0%;
}
.btn-light-6 span:after {
height: 2px;
width: 0%;
}
.btn-light-6 span:hover:before {
height: 100%;
}
.btn-light-6 span:hover:after {
width: 100%;
}