在很多列表调用的时候都需要有隔行换色或者多行不同颜色,特别在全通式的首页轮展图的时候,要想实现轮展图背景随着图片的更换,超过三张或多张的时候,隔行换色已经不能解决问题了,在原来的隔行换色的基础上,进行小小的修改就可以实现这样的功能。
列表调用隔行换色
全通式首页轮展图背景色更换
照片墙形式
标签说明:
| 1 2 3 4 5 6 7 8 9 | arclist 标签下使用 [field:global.autoindex/] 默认从1开始 channel 标签下使用 [field:global.autoindex/] 默认从0开始 channelartlist 标签下使用 {dede:global.itemindex/} 默认从1开始 arclist 从0开始[field:global name=autoindex runphp="yes"]@me=@me-1;[/field:global] channel 从1开始[field:global name=autoindex runphp="yes"]@me=@me+1;[/field:global][field:typename/] channelartlist 从0开始{dede:global name=itemindex runphp='yes'}@me=@me-1;{/dede:global} channelartlist 标签下使用 {dede:global name='itemindex' runphp='yes'}@me;{/dede:global} |
隔行换色(增加样式),list同arclist
|
如果运用channel弄隔行换色,需要自增从1开始,精简写法如下:
| 1 2 3 4 5 6 7 8 9 |
|
隔3行(n行)换色(增加样式)精简写法,替换橙色字体部分
| 1 2 3 4 5 6 7 8 9 |
|
多行随意换色(增加样式)
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
|
精简写法
| 1 2 3 4 5 6 7 8 9 |
|
公共css样式部分
这里注意每张图的在调用的时候width和height可以为空,如果是或者乱填都没关系,靠样式进行定义。
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|



