首页 > 其他分享 >SVG: draw Kou check

SVG: draw Kou check

时间:2022-11-24 00:12:14浏览次数:57  
标签:draw ol SVG 50% width stroke goals 0px Kou

 

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">		
<title>svg draw cat</title>
<meta name="Description" content="geovindu"/>
<meta name="Keywords" content="geovindu"/>
<meta name="author" content="geovindu"/>	
  <script src="ajax/libs/modernizr/2.8.3/modernizr.min.js" type="text/javascript"></script>
  <link rel='stylesheet' href='bootstrap/3.4.1/css/bootstrap.min.css'>
<style type="text/css">

ol.goals a svg {
    position: absolute;
    right: 0;
    top: 1rem;
    width: 1rem;
    height: 1rem;
}
ol.goals a svg polygon {
    fill: #fff;
}
ol.goals a:visited {
    color: #ccc;
}
ol.goals a:visited svg polygon {
    fill: green;
}
@media screen and (max-width: 500px) {
    ol.goals {
        text-align: center;
        margin-left: 0;
    }
    ol.goals li {
        margin-left: 0;
        z-index: 2;
    }
    ol.goals:after {
        left: 50%;
        height: 3.5rem;
        background: #eee;
    }
    ol.goals img {
        display: block;
        margin-left: 6rem;
    }
}	
	
.done {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: #fff;
    stroke-miterlimit: 10;
    margin: 20px auto;
    box-shadow: inset 0px 0px 0px #7ac142;
    animation: fill-green 0.5s ease-in-out 0.5s forwards, scale 0.3s ease-in-out 0.7s both;
}
.done .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;
}
.done .check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.7s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}
.error {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: #fff;
    stroke-miterlimit: 10;
    margin: 20px auto;
    box-shadow: inset 0px 0px 0px #e74c3c;
    animation: fill-red 0.5s ease-in-out 0.5s forwards, scale 0.3s ease-in-out 0.7s both;
}
.error .circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #e74c3c;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}
.error .line {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.7s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}
.error .line:nth-child(1) {
    animation-delay: 1s;
}
.error .line:nth-child(2) {
    /* Animate */
     
    animation-delay: 0.7s;
}
@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}
@keyframes scale {
    0%, 100% {
        transform: none;
    }
    50% {
        transform: scale3d(1.2, 1.2, 1);
    }
    80% {
        transform: scale3d(0.8, 0.8, 1);
    }
}
@keyframes fill-green {
    100% {
        box-shadow: inset 0px 0px 0px 25px #7ac142;
    }
}
@keyframes fill-red {
    100% {
        box-shadow: inset 0px 0px 0px 25px #e74c3c;
    }
}	
	
</style>
</head>

<body>
<div class="container">
<div class="row">		
<svg viewBox="0 0 50 50">
<polygon points="4,30 14,40 45,12 41,9 14,34 8,27" style="stroke: red; fill: none;"  />
</svg>	
	</div>
<div class="row">			
<svg class="done" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 52 52">
    <circle class="circle" cx="26" cy="26" r="25" fill="none" />
    <path class="check" fill="none" d="M14.1 27.2l7.1 7.2 16.7-16.8" />
</svg>
	</div>
	<div class="row">		
<svg class="error" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 52 52">
    <circle class="circle" cx="26" cy="26" r="25" fill="none" />
    <path class="line" fill="none" d="M17.36,34.736l17.368-17.472" />
    <path class="line" fill="none" d="M34.78,34.684L17.309,17.316" />
</svg>
	</div>
	</div>
</body>
</html>

 Basic shapes - SVG: Scalable Vector Graphics | MDN (mozilla.org) 

goldfire/howler.js: Javascript audio library for the modern web. (github.com)

标签:draw,ol,SVG,50%,width,stroke,goals,0px,Kou
From: https://www.cnblogs.com/geovindu/p/16920583.html

相关文章

  • 添加扩展 Windows 的资源管理器中预览 SVG
    在Windows的资源管理器中预览SVG图标的扩展打开链接https://github.com/maphew/svg-explorer-extension/releases,下载一个适合你电脑的版本。清空缓存打开cmd窗......
  • SVG: draw cat
     <!doctypehtml><html><head><metacharset="utf-8"><metaname="viewport"content="width=device-width,initial-scale=1.0"><metahttp-equiv="X-UA-......
  • antdv drawer 在界面中做抽屉父级不被撑开 bug
    问题描述*.当放置于容器内时-无法与平级共享父级,而是定位与父级之上,且其外边无法被自动撑开*.被超出隐藏无法将元素定位于弹窗左侧效果图constwidth=300;<divc......
  • 如何将图片转为SVG格式素材用于VideoScribe?
    SVG素材不够怎么办?自己动手制作吧! 方法一、利用AI将图片转换成SVG格式素材  【点击下载】   方法二、VectorMagic (快速将图片转成SVG)【点击下载】 打开软件直接将......
  • git checkout 命令图文详解
    目录gitcheckoutbranchname(切换本地分支)切换远程分支放弃修改gitcheckout.gitcheckout–filenamegitcheckout-f回退版本检出文件,分支转换。gitcheckoutbran......
  • 5 分钟速通 SVG
    5分钟速通SVG2022-11-1608:561135154前言SVG对不少前端来说就是一个熟悉的陌生人,此篇博客是我学习完SVG后做的一个小总结,帮助我快速回忆SVG相关内容。它不能帮你精......
  • SVG Line Between Divs (multi-point)
     <!doctypehtml><html><head><metacharset="utf-8"><title>SVGLineBetweenDivs(multi-point)</title><style>html,body{margin:0;padding:0;}......
  • vue3 SvgIcon配置
    1、安装依赖插件vite-plugin-svg-iconsyarnaddvite-plugin-svg-icons-D2、安装glob不安装会提示Error:Cannotfindmodule'fast-glob'yarnaddfast-glob-D3、......
  • 手把手,完整的从0搭建vite-vue3-ts项目框架:配置less+svg+pinia+vant+axios
    项目同步git:https://gitee.com/lixin_ajax/vue3-vite-ts-pinia-vant-less.git  为避免赘述,过于基础的点会直接省略或贴图,比如创建文件夹/文件的路径/路由一类配置相......
  • svg图片大小固定,无法像普通图片可以伸展?
    <svgwidth="100%"height="100%"id="svg"viewBox="001440700"xmlns="http://www.w3.org/2000/svg"class="transitionduration-300ease-in-outdelay-150"prese......