带动画打钩的checkbox勾选效果代码
代码语言:html
所属分类:表单美化
代码描述:带动画打钩的checkbox勾选效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> /* See the explanation of the animation here: https://codepen.io/timseverien/pen/yvJkm */ @-webkit-keyframes check { 0% { height: 0; width: 0; } 25% { height: 0; width: 10px; } 50% { height: 20px; width: 10px; } } @-moz-keyframes check { 0% { height: 0; width: 0; } 25% { height: 0; width: 10px; } 50% { height: 20px; width: 10px; } } @-ms-keyframes check { 0% { height: 0; width: 0; } 25% { height: 0; width: 10px; } 50% { height: 20px; width: 10px; } } @keyframes check { 0% { height: 0; width: 0; } 25% { height: 0; width: 10px; } 50% { height: 20px; width: 10px; } } body { background-color: #6aa; font-family: 'Lato', sans-serif; font-weight: 100%; } .wrapper { -moz-transform: translate(-50%, -50%); -ms-transform: translate(-50%, -50%); -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); color: #fff; left: 50%; position: absolute; text-align: center; top: 50%; } .checkbox, .checkbox-alt { background-color: #fff; display: inline-block; height: 50px; margin: 0 0.25em; width: 50px; } .checkbox label, .checkbox-alt label { display: block; height: 50px; position: relative; width: 50px; } .checkbox label:after, .checkbox-alt label:after { /* This element has a border on the right, and top. By rotating it looks like a check symbol, but the wrong way. That's why I'm flipping it with scaleX(-1) */ -moz-transform: scaleX(-1) rotate(135deg); -ms-transform: scaleX(-1) rotate(135deg); -webkit-tran.........完整代码请登录后点击上方下载按钮下载查看
网友评论0