按钮模版:btn-light-1
小于 1 分钟
<div class="container">
<button class="btn-light-1">View Room</button>
</div>
.container {
display: flex;
justify-content: center;
align-items: center;
background: #fff;
width: 100%;
height: 200px;
}
.btn-light-1 {
width: 120px;
height: 52px;
position: relative;
box-sizing: border-box;
font-size: 16px;
font-weight: bold;
color: #333;
background-color: transparent;
transition: all 0.4s ease-in-out;
border-radius: 6px;
border: none;
cursor: pointer;
z-index: 1;
}
.btn-light-1:before {
content: "";
width: 4px;
height: inherit;
position: absolute;
top: 0;
left: 0;
z-index: 0;
background-color: #333;
border-radius: 2px;
transition: all 0.4s ease-in-out;
z-index: -1;
}
.btn-light-1:hover {
color: #fff;
}
.btn-light-1:hover:before {
width: 100%;
}