svg+css实现按钮点击激活动画效果代码
代码语言:html
所属分类:动画
代码描述:svg+css实现按钮点击激活动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Mukta+Malar:400,500,600'>
<style>
.activate {
display: table;
background: #5628EE;
box-shadow: 0 4px 20px rgba(86, 40, 238, 0.15);
line-height: 20px;
padding: 12px;
border-radius: 22px;
color: #fff;
font-weight: 500;
cursor: pointer;
transition: transform 0.2s ease, background 0.3s ease, box-shadow 0.3s ease;
}
.activate span {
display: inline-block;
vertical-align: top;
width: 20px;
height: 20px;
background: #fff;
border-radius: 50%;
margin: 0 4px 0 0;
position: relative;
overflow: hidden;
}
.activate span:before {
content: "";
left: 0;
top: 0;
width: 100%;
height: 100%;
position: absolute;
background: #5628EE;
border-radius: 50%;
transform: scale(0);
transition: transform 0.3s ease, background 0.3s ease;
}
.activate span svg {
position: absolute;
width: 12px;
height: 12px;
left: 50%;
top: 50%;
margin: -6px 0 0 -6px;
z-index: 1;
}
.activate span svg:nth-child(1) {
width: 20px;
height: 20px;
top: 0;
left: 0;
fill: none;
margin: 0;
stroke: #fff;
stroke-wi.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0