繁体   English   中英

Nativescript旋转动画无限迭代不起作用

[英]Nativescript rotate animation with infinite iteration not working

我想通过无限迭代旋转标签,目前它在 iOS 设备上运行良好,但在 android 上它只旋转 2 秒然后停止。

下面是我的 CSS 代码

 .fas { font-family: "Font Awesome 5 Free", "fa-solid-900"; font-weight: 900; } .spin { animation-name: rotate; animation-duration: 1s; animation-iteration-count: infinite; animation-timing-function: linear; } @keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
 <Label text="rotate value" class="fas spin"></Label>

我不确定它是否是一个错误,不能期望 {N} 与浏览器内联,因为我们在这里处理本机元素。 下面的黑客似乎有效,

@keyframes rotate {
    0% {transform: rotate(0deg);}
    99.9% {transform: rotate(360deg);}
    100% {transform: rotate(0deg);}
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM