1. 每行不同
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif)
<
style
type
=”text/css”
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
<!–
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
tr
{
background-color
:
expression((this.sectionRowIndex==0)?””:
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
(this.sectionRowIndex%2==0)?”red”:”blue”)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif)
–>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
</
style
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
</
HEAD
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
<
table
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
<
tr
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
<
td
>
第1行
</
td
><
td
>
第1行
</
td
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
</
tr
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
<
tr
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
<
td
>
第2行
</
td
><
td
>
第2行
</
td
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
</
tr
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
<
tr
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
<
td
>
第3行
</
td
><
td
>
第3行
</
td
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
</
tr
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
<
tr
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
<
td
>
第4行
</
td
><
td
>
第4行
</
td
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
</
tr
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
<
tr
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
<
td
>
第5行
</
td
><
td
>
第5行
</
td
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
</
tr
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
</
table
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif)
<
style
type
=”text/css”
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
<!–
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
tr
{
background-color
:
expression((this.sectionRowIndex%2==0)?”red”:”blue”)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
td
{
background-color
:
expression((this.cellIndex%2==0)?””:((this.parentElement.sectionRowIndex%2==0)?”green”:”yellow”))
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif)
–>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
</
style
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
</
HEAD
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
<
table
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
<
tr
><
td
>
第1行
</
td
><
td
>
第1行
</
td
><
td
>
第1行
</
td
><
td
>
第1行
</
td
><
td
>
第1行
</
td
></
tr
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
<
tr
><
td
>
第2行
</
td
><
td
>
第2行
</
td
><
td
>
第2行
</
td
><
td
>
第2行
</
td
><
td
>
第2行
</
td
></
tr
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
<
tr
><
td
>
第3行
</
td
><
td
>
第3行
</
td
><
td
>
第3行
</
td
><
td
>
第3行
</
td
><
td
>
第3行
</
td
></
tr
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
<
tr
><
td
>
第4行
</
td
><
td
>
第4行
</
td
><
td
>
第4行
</
td
><
td
>
第4行
</
td
><
td
>
第4行
</
td
></
tr
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
<
tr
><
td
>
第5行
</
td
><
td
>
第5行
</
td
><
td
>
第5行
</
td
><
td
>
第5行
</
td
><
td
>
第5行
</
td
></
tr
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
</
table
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif)
<
style
type
=”text/css”
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
<!–
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
tr
{
background-color
:
expression((this.sectionRowIndex==0)?””:
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
(this.sectionRowIndex%2==0)?”red”:”blue”)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif)
–>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
</
style
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
</
HEAD
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
<
table
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
<
tr
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
<
td
>
第1行
</
td
><
td
>
第1行
</
td
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
</
tr
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
<
tr
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
<
td
>
第2行
</
td
><
td
>
第2行
</
td
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
</
tr
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
<
tr
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
<
td
>
第3行
</
td
><
td
>
第3行
</
td
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
</
tr
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
<
tr
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
<
td
>
第4行
</
td
><
td
>
第4行
</
td
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
</
tr
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
<
tr
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
<
td
>
第5行
</
td
><
td
>
第5行
</
td
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
</
tr
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
</
table
>
2. 每行每个单元格不同
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif)
<
style
type
=”text/css”
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
<!–
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
tr
{
background-color
:
expression((this.sectionRowIndex%2==0)?”red”:”blue”)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
td
{
background-color
:
expression((this.cellIndex%2==0)?””:((this.parentElement.sectionRowIndex%2==0)?”green”:”yellow”))
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif)
–>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
</
style
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
</
HEAD
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
<
table
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
<
tr
><
td
>
第1行
</
td
><
td
>
第1行
</
td
><
td
>
第1行
</
td
><
td
>
第1行
</
td
><
td
>
第1行
</
td
></
tr
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
<
tr
><
td
>
第2行
</
td
><
td
>
第2行
</
td
><
td
>
第2行
</
td
><
td
>
第2行
</
td
><
td
>
第2行
</
td
></
tr
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
<
tr
><
td
>
第3行
</
td
><
td
>
第3行
</
td
><
td
>
第3行
</
td
><
td
>
第3行
</
td
><
td
>
第3行
</
td
></
tr
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
<
tr
><
td
>
第4行
</
td
><
td
>
第4行
</
td
><
td
>
第4行
</
td
><
td
>
第4行
</
td
><
td
>
第4行
</
td
></
tr
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
<
tr
><
td
>
第5行
</
td
><
td
>
第5行
</
td
><
td
>
第5行
</
td
><
td
>
第5行
</
td
><
td
>
第5行
</
td
></
tr
>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
</
table
>