簡體   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