SVG: draw Kou check

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<!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)

posted @   ®Geovin Du Dream Park™  阅读(25)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 25岁的心里话
· 闲置电脑爆改个人服务器(超详细) #公网映射 #Vmware虚拟网络编辑器
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· 零经验选手,Compose 一天开发一款小游戏!
· 一起来玩mcp_server_sqlite,让AI帮你做增删改查!!
历史上的今天:
2017-11-23 Csharp:Paging Sorting Searching In ASP.NET MVC 5
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示