html选择确认,SVG+CSS3 选中确认动效(勾号/勾选)

这段CSS代码展示了如何创建一个100px宽30px高的.success视频图标,包括一个圆形边框和内部的对号标记。代码中定义了动画来实现边框填充、缩放和颜色变化的效果,为图标添加动态视觉效果。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

CSS

语言:

CSSSCSS

确定

.video-success {

width: 100px;

height: 30px;

margin: 0 auto;

}

.video-success .checkmark__circle {

stroke-dasharray: 166;

stroke-dashoffset: 166;

stroke-width: 2;

stroke-miterlimit: 10;

stroke: #7ac142;

fill: none;

-webkit-animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;

animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;

}

.video-success .checkmark {

width: 56px;

height: 56px;

border-radius: 50%;

display: block;

stroke-width: 2;

stroke: #fff;

stroke-miterlimit: 10;

margin: 10% auto;

box-shadow: inset 0px 0px 0px #7ac142;

-webkit-animation: fill 0.4s ease-in-out 0.4s forwards, scale 0.3s ease-in-out 0.9s both;

animation: fill 0.4s ease-in-out 0.4s forwards, scale 0.3s ease-in-out 0.9s both;

}

.video-success .checkmark__check {

-webkit-transform-origin: 50% 50%;

-ms-transform-origin: 50% 50%;

transform-origin: 50% 50%;

stroke-dasharray: 48;

stroke-dashoffset: 48;

-webkit-animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;

animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;

}

@-webkit-keyframes stroke {

100% {

stroke-dashoffset: 0;

}

}

@keyframes stroke {

100% {

stroke-dashoffset: 0;

}

}

@-webkit-keyframes scale {

0%, 100% {

-webkit-transform: none;

transform: none;

}

50% {

-webkit-transform: scale3d(1.1, 1.1, 1);

transform: scale3d(1.1, 1.1, 1);

}

}

@keyframes scale {

0%, 100% {

-webkit-transform: none;

transform: none;

}

50% {

-webkit-transform: scale3d(1.1, 1.1, 1);

transform: scale3d(1.1, 1.1, 1);

}

}

@-webkit-keyframes fill {

100% {

box-shadow: inset 0px 0px 0px 30px #7ac142;

}

}

@keyframes fill {

100% {

box-shadow: inset 0px 0px 0px 30px #7ac142;

}

}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值