div+css实现科技感十足的动态按钮效果代码
代码语言:html
所属分类:表单美化
代码描述:div+css实现科技感十足的动态按钮效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
html, body {
margin: 0;
padding: 0;
width: 100%;
min-height: 100%;
}
body {
background: #222;
font-family: Segoe UI, sans-serif;
display: flex;
flex-wrap: wrap;
justify-content: center;
padding-top: 20%;
}
div {
margin: 25px;
width: 300px;
text-align: center;
padding: 20px 25px;
box-sizing: border-box;
color: #eee;
border: 1px solid rgba(255, 255, 255, 0.15);
background: #1d1d1d;
position: relative;
transition: box-shadow 250ms ease;
}
div::before {
z-index: -1;
position: absolute;
content: "";
top: 0;
left: -2px;
right: -2.5px;
bottom: -2.25px;
box-shadow: 0 3px 20px -3px #7af;
background: linear-gradient(transparent, #7af);
opacity: 0;
transition: opacity 250ms ease;
animation: pulse 3s linear infinite alternate;
}
div::after {
position: absolute;
content: "";
height: 2px;
top: 0;
left: 0;
width: 100%;
-webkit-filter: drop-shadow(0 0 5px #7af);
filter: drop-shadow(0 0 5px #7af);
background-image: linear-gradient(90deg, #7af, #7af 25%, transparent 25%, transparent);
background-size: 50%;
animation: loading 2s linear infinite;
opacity: 0;
transition: opacity 250ms ease;
}
div.error.loading {
.........完整代码请登录后点击上方下载按钮下载查看
网友评论0