dart:html
庫中Element.classes
屬性的用法介紹如下。
用法一
CssClassSet classes
應用於此元素的 CSS 類集。
這個集合使添加、刪除或切換應用於此元素的類變得容易。
element.classes.add('selected');
element.classes.toggle('isOnline');
element.classes.remove('selected');
用法二
void classes=(Iterable<String> value)
相關用法
- Dart Element.children用法及代碼示例
- Dart Element.created用法及代碼示例
- Dart Element.tag用法及代碼示例
- Dart Element.querySelectorAll用法及代碼示例
- Dart Element.animate用法及代碼示例
- Dart Element.querySelector用法及代碼示例
- Dart Element.insertAdjacentHtml用法及代碼示例
- Dart Element.dataset用法及代碼示例
- Dart Element.html用法及代碼示例
- 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大神的英文原創作品 classes property。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。