The mod parameter in volist is equivalent to specifying a frequency. The system calculates the remainder (the % operator in PHP) of the mod parameter value in the current actual record. Combined with tags (such as eq tags), you can control the output data or data display format according to the frequency.
The code for the ThinkPHP Volist label to implement the line-changing is as follows.
Method 1,
-
- Style = "background-color: #000 ;"> · {$ Vo. title} {$ Vo. edittime | date = "Y, m, d ",###} {$ Vo. author}
The mod parameter in volist is equivalent to specifying a frequency. The system calculates the remainder (the % operator in PHP) of the mod parameter value in the current actual record. Combined with tags (such as eq tags), you can control the output data or data display format based on the frequency.
Method 2,
-
- Style = "background-color: #000 ;"> · {$ Vo. title} {$ Vo. edittime | date = "Y, m, d ",###} {$ Vo. author}
-
Next, we will list the tr and td instances in a Volist cyclic table.
-
-
-
- {$ Site. name}
However, there is still an imperfect point in this example, that is, if a tr is placed with five td S, there may be fewer td s in the last line, then the style is not good, let me know how to solve the problem.