AngularJS ng-class-even 指令
AngularJS 教程
· 2019-04-01 13:37:27
AngularJS 实例
为表格的偶数行设置 class="striped":
<table ng-controller="myCtrl">
<tr ng-repeat="x in records" ng-class-even="'striped'">
<td>{{x.Name}}</td>
<td>{{x.Country}}</td>
</tr>
</table>
<tr ng-repeat="x in records" ng-class-even="'striped'">
<td>{{x.Name}}</td>
<td>{{x.Country}}</td>
</tr>
</table>
定义和用法
ng-class-even 指令用于为 HTML 元素动态的绑定一个或多个 CSS 类,但只作用于偶数行。
ng-class-even 指令需要与 ng-repeat 指令搭配使用。
ng-class-even 指令建议用在表格的样式渲染中,但是所有HTML元素都是支持的。
语法
<element ng-class-even="expression"></element>
所有 HTML 元素都支持。
参数值
| 值 | 描述 |
|---|---|
| expression | 表达指定一个或多个 CSS 类。 |
点击查看所有 AngularJS 教程 文章: https://www.codercto.com/courses/l/36.html
Python Algorithms
Magnus Lie Hetland / Apress / 2010-11-24 / USD 49.99
Python Algorithms explains the Python approach to algorithm analysis and design. Written by Magnus Lie Hetland, author of Beginning Python, this book is sharply focused on classical algorithms, but it......一起来看看 《Python Algorithms》 这本书的介绍吧!