纯css实现checkbox点击动画特效
代码语言:html
所属分类:表单美化
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>A checkbox animation</title>
<style>
*
{
-webkit-tap-highlight-color: transparent;
outline: none;
}
html, body
{
height: 100%;
}
body
{
margin: 0;
}
#_checkbox
{
display: none;
}
label
{
position: absolute;
top: 50%;
right: 0;
left: 0;
width: 100px;
height: 100px;
margin: 0 auto;
background-color: #f72414;
transform: translateY(-50%);
border-radius: 50%;
box-shadow: 0 7px 10px #ffbeb8;
cursor: pointer;
transition: 0.2s ease transform, 0.2s ease background-color, 0.2s ease box-shadow;
overflow: hidden;
}
label:before
{
content: "";
position: absolute;
top: 50%;
right: 0;
left: 0;
width: 70px;
height: 70px;
margin: 0 auto;
background-color: #fff;
transform: translateY(-50%);
.........完整代码请登录后点击上方下载按钮下载查看
网友评论0