css实现代办事项列表勾选划掉打钩横线动画效果代码
代码语言:html
所属分类:表单美化
代码描述:css实现代办事项列表勾选划掉打钩横线动画效果代码
代码标签: css 代办 事项 列表 勾选 划掉 打钩 横线 动画
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
* {
margin: 0;
padding: 0;
font: inherit;
}
body {
display: grid;
place-content: center;
grid-gap: 0.5em;
grid-template-columns: max-content 8.75em;
color: #595959;
font: clamp(.625em, 8vw, 5em)/2 ubuntu, sans-serif;
}
h3 {
grid-column: 1/span 2;
text-align: center;
}
input {
width: 2em;
height: 2em;
opacity: 0;
}
input:checked + label {
--sel: 1 ;
}
label {
--i: var(--sel, 0);
--not-i: calc(1 - var(--i));
justify-self: start;
position: relative;
padding: 0 0.25em;
color: hsl(0, 0%, calc(35% + var(--i)*55%));
animation: slide calc(var(--sel)*.5*0.35s) ease-out 2 alternate;
cursor: pointer;
}
label::before, label::after {
position: absolute;
right: calc(100% + 0.5em);
content: "";
}
label::before {
box-sizing: border-box;
border: solid 0.125em currentcolor;
width: 2em;
height: 2em;
border-radius: 50%;
background: hsl(207, 85%, 97%, var(--i));
color: hsl(207, calc(var(--i)*85%), calc(97% + var(--not-i)*-15%));
transition: color 0.35s, background 0.35s;
animation: spark calc(var(--sel)*0.35s);
}
label::after {
--mask:
linear-gradient(-45deg, transparent 50%, red 0) calc(var(--not-i)*100%) calc(var(--not-i)*100%)/ 200% 200%,
conic-gradient(at 0.125em calc(100% - 0.125em), transparent 25%, red 0%),
radial-gradient(circle at 50% 100%,
transparent calc(0.0625em + -.5px), red calc(0.0625em + .5px))
0 0/ 0.125em 0.0625em no-repeat,
radial-gradient(circle at 0% 50%,
transparen.........完整代码请登录后点击上方下载按钮下载查看
网友评论0