css炫酷的按钮
效果一
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/4a4940133c305e8206e067939b62c69d.png)
<style>
body {
display: flex;
justify-content: center;
align-items: center;
background: #000;
min-height: 100vh;
}
a {
position: relative;
padding: 10px 30px;
margin: 0 45px;
color: #21ebff;
text-decoration: none;
font-size: 20px;
text-transform: uppercase;
transition: 0.5s;
overflow: hidden;
-webkit-box-reflect: below 1px linear-gradient(transparent, #0003);
}
a:hover {
background: #21ebff;
color: #111;
box-shadow: 0 0 50px #21ebff;
transition-delay: 0.5s;
}
a::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 10px;
height: 10px;
border-top: 2px solid #21ebff;
border-left: 2px solid #21ebff;
transition: 0.5s;
transition-delay: 0.5s;
}
a:hover::before {
width: 100%;
height: 100%;
transition-delay: 0s;
}
a::after {
content: '';
position: absolute;
right: 0;
bottom: 0;
width: 10px;
height: 10px;
border-bottom: 2px solid #21ebff;
border-right: 2px solid #21ebff;
transition: 0.5s;
transition-delay: 0.5s;
}
a:hover::after {
width: 100%;
height: 100%;
transition-delay: 0s;
}
button {
position: relative;
padding: 10px 30px;
margin: 0 45px;
color: #21ebff;
text-decoration: none;
font-size: 20px;
text-transform: uppercase;
transition: 0.5s;
overflow: hidden;
-webkit-box-reflect: below 1px linear-gradient(transparent, #0003);
color: #111;
box-shadow: 0 0 50px #21ebff;
transition-delay: 0.5s;
border-radius: 50%;
}
.text {
position: relative;
padding: 10px 30px;
margin: 0 45px;
color: #21ebff;
text-decoration: none;
font-size: 20px;
text-transform: uppercase;
transition: 0.5s;
overflow: hidden;
-webkit-box-reflect: below 1px linear-gradient(transparent, #0003);
box-shadow: 0 0 50px #21ebff;
transition-delay: 0.5s;
border-radius: 50%;
}
</style>
<body>
<a href="#">Button</a>
<button> fdfdf</button>
<div class="text"> dfsdfsdf </div>
</body>
效果二
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/f6d72828306936478922414129ebc5f8.png)
<style>
@keyframes run {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
@keyframes daorun {
from {
transform: rotate(360deg);
}
to {
transform: rotate(0deg);
}
}
.sleepContentView {
width: 242px;
height: 242px;
background-image: linear-gradient(#0cec17, rgb(12, 67, 219));
border-radius: 50%;
text-align: center;
padding: 20px;
font-size: 28px;
box-sizing: border-box;
animation: run 2.5s linear infinite;
box-shadow: 0 0 50px #707070;
}
.sleepContentView .circle {
width: 100%;
height: 100%;
background: #fff;
border-radius: 50%;
}
.contenttext {
position: absolute;
z-index: 99px;
width: 190px;
top: 100px;
animation: daorun 2.5s linear infinite;
}
</style>
<body>
<div class="sleepContentView">
<div class="circle">
<div class="contenttext">
Button
</div>
</div>
</div>
</body>
效果三
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/592e055b3f9dc5d46e1e066791dc5ae0.png)
<style>
.button-3d-2 {
position: relative;
background: #ecd300;
background-image: linear-gradient(to right, rgb(248, 66, 20), transparent);
font-size: 1.4rem;
text-shadow: 0 -1px 0 #c3af07;
color: white;
border: 1px solid hsl(54, 100%, 20%);
border-radius: 100%;
height: 120px;
width: 120px;
z-index: 4;
outline: none;
box-shadow: inset 0 1px 0 hsl(54, 100%, 50%), 0 2px 0 hsl(54, 100%, 20%), 0 3px 0 hsl(54, 100%, 18%), 0 4px 0 hsl(54, 100%, 16%), 0 5px 0 hsl(54, 100%, 14%), 0 6px 0 hsl(54, 100%, 12%), 0 7px 0 hsl(54, 100%, 10%), 0 8px 0 hsl(54, 100%, 8%), 0 9px 0 hsl(54, 100%, 6%);
}
.button-3d-2:active {
margin-top: 2px;
box-shadow: inset 0 1px 0 hsl(54, 100%, 50%), 0 2px 0 hsl(54, 100%, 16%), 0 3px 0 hsl(54, 100%, 14%), 0 4px 0 hsl(54, 100%, 12%), 0 5px 0 hsl(54, 100%, 10%), 0 6px 0 hsl(54, 100%, 8%), 0 7px 0 hsl(54, 100%, 6%);
}
</style>
<body>
<button class="button-3d-2">Circle!</button>
</body>