dart:html
庫中Element.animate
方法的用法介紹如下。
用法:
@SupportedBrowser(SupportedBrowser.CHROME, '36')
Animation animate(
Iterable<Map<String, dynamic>> frames,
[dynamic timing]
)
@SupportedBrowser(SupportedBrowser.CHROME, '36')
創建一個新的AnimationEffect對象,其目標元素是調用該方法的對象,並調用該元素的節點文檔的文檔時間軸的AnimationTimeline對象的play()方法,傳遞新創建的AnimationEffect 作為方法的參數。返回效果的動畫。
例子
var animation = elem.animate([{"opacity": 75}, {"opacity": 0}], 200);
var animation = elem.animate([
{"transform": "translate(100px, -100%)"},
{"transform" : "translate(400px, 500px)"}
], 1500);
frames
參數是一個 Iterable
相關用法
- Dart Element.children用法及代碼示例
- Dart Element.tag用法及代碼示例
- Dart Element.querySelectorAll用法及代碼示例
- Dart Element.created用法及代碼示例
- Dart Element.querySelector用法及代碼示例
- Dart Element.insertAdjacentHtml用法及代碼示例
- Dart Element.dataset用法及代碼示例
- Dart Element.html用法及代碼示例
- Dart Element.classes用法及代碼示例
- Dart ElementList.classes用法及代碼示例
- Dart Event.eventType用法及代碼示例
- Dart Enum.compareByIndex用法及代碼示例
- Dart EventStreamProvider.forTarget用法及代碼示例
- Dart Events用法及代碼示例
- Dart EventStreamProvider.forElement用法及代碼示例
- Dart EnumName.name用法及代碼示例
- Dart Enum.compareByName用法及代碼示例
- Dart Error用法及代碼示例
- Dart MapMixin.containsKey用法及代碼示例
- Dart Iterator用法及代碼示例
- Dart AttributeClassSet.intersection用法及代碼示例
- Dart num.sign用法及代碼示例
- Dart TransformList.last用法及代碼示例
- Dart FileList.first用法及代碼示例
- Dart CanvasRenderingContext2D.drawImageScaledFromSource用法及代碼示例
注:本文由純淨天空篩選整理自dart.dev大神的英文原創作品 animate method。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。