html绘制图标,HTML – 如何使用SVG CSS绘制X标志?

我需要创建一个“X”复选标记的动画(​​失败).

我找到了一个动画“v”复选标记的好例子(为了成功).

代码使用曲线贝塞尔设计.

我试过阅读并试图做一个X标志,但没有成功.

你能帮我么 ?

.checkmark__circle {

stroke-dasharray: 166;

stroke-dashoffset: 166;

stroke-width: 2;

stroke-miterlimit: 10;

stroke: #7ac142;

fill: none;

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

}

.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;

animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;

}

.checkmark__check {

transform-origin: 50% 50%;

stroke-dasharray: 48;

stroke-dashoffset: 48;

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

}

@keyframes stroke {

100% {

stroke-dashoffset: 0;

}

}

@keyframes scale {

0%, 100% {

transform: none;

}

50% {

transform: scale3d(1.1, 1.1, 1);

}

}

@keyframes fill {

100% {

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

}

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值