我正在尝试在HTML中添加CSS代码,但是我无法让SVG动画工作。我在这做错了什么?我的客人是我错误地引用< style>
但经过几次尝试后我无法正常工作。
< SVG>
 < style type =“text / css”>
 .spinner {
动画:旋转2s线性无限;
 z-index:2;
 position:absolute;
顶部:50%;
左:50%;
保证金:-25px 0 0 -25px;
宽度:50px;
身高:50px;
 }

 .path {
 stroke:hsl(210,70,75);
 stroke-linecap:round;
动画:破折号1.5s轻松进出无限;
 }

 @keyframes轮换{
 100%{
 transform:rotate(360deg);
 }
 }

 @keyframes dash {
 0%{
 stroke-dasharray:1,150;
 stroke-dashoffset:0;
 }
 50%{
 stroke-dasharray:90,150;
 stroke-dashoffset:-35;
 }
 100%{
 stroke-dasharray:90,150;
 stroke-dashoffset:-124;
 }
 }
 < /风格>
 < svg class =“spinner”>
 < circle class =“path”cx =“25”cy =“25”r =“20”fill =“none”stroke-width =“5”< / circle>
 < / svg>
< / svg>



 

 提前谢谢。

答案 0 :(得分:0)
您的动画有效。您搞砸了笔触颜色定义。 hsl(210, 70%, 75%);
和圆形元素开始标记缺少右括号>
<circle class="path" cx="25" cy="25" r="20" fill="none" stroke-width="5" > </circle>
html, body {
height: 100%;
background-color: #000000;
}
&#13;
<svg>
<style type="text/css">
.spinner {
animation: rotate 2s linear infinite;
transform-origin:center center;
z-index: 2;
position: absolute;
top: 50%;
left: 50%;
margin: -25px 0 0 -25px;
width: 50px;
height: 50px;
}
.path {
stroke: hsl(210, 70%, 75%);
stroke-linecap: round;
animation: dash 1.5s ease-in-out infinite;
}
@keyframes rotate {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(359deg);
}
}
@keyframes dash {
0% {
stroke-dasharray: 1, 150;
stroke-dashoffset: 0;
}
50% {
stroke-dasharray: 90, 150;
stroke-dashoffset: -35;
}
100% {
stroke-dasharray: 90, 150;
stroke-dashoffset: -124;
}
}
</style>
<g class="spinner">
<circle class="path" cx="25" cy="25" r="20" fill="none" stroke-width="5"></circle>
</g>
</svg>
&#13;
答案 1 :(得分:0)
您需要关闭圈子的
Rowid batch maker checker date
1 101 john null 4feb
2 101 john raja 4feb
3 101 john null 5feb
4 101 john raja 6feb
5 101 john null 9feb
应该是
Batch maker checker
101 john raja -- 1st and 2nd row
101 john raja -- 3rd and 4th row
101 john null -- 5th row only