2023.2.26今天我学习了如何使用css样式制作出炫酷的按钮,效果如下:
css代码如下:
.button_one_style {
width: 3.6%;
height: 3.8%;
position: absolute;
background-color: rgb(1, 8, 42);
top: 10px;
left: 20.5%;
z-index: 1000;
color: #b7a3e0;
text-decoration: none;
transition: 0.5s;
overflow: hidden;
-webkit-box-reflect: below 1px linear-gradient(transparent, #0003);
}
.button_one_style:hover {
background: #b19ae0;
color: #111;
box-shadow: 0 0 50px #7033ef;
transition-delay: 0.5s;
}
.button_one_style:hover::before {
width: 100%;
height: 100%;
transition-delay: 0s;
}
.button_one_style::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 10px;
height: 10px;
border-bottom: 2px solid #B7A3E0;
border-left: 2px solid #B7A3E0;
transition: 0.5s;
transition-delay: 0.25s;
}
.button_one_style:hover::after {
width: 100%;
height: 100%;
transition-delay: 0s;
}
.button_one_style::before {
content: '';
position: absolute;
top: 0;
right: 0;
width: 10px;
height: 10px;
border-top: 2px solid #B7A3E0;
border-right: 2px solid #B7A3E0;
transition: 0.5s;
transition-delay: 0.25s;
}