如何在asp.net中为转发器排列颜色 [英] How to color row of a repeater in asp.net

查看:78
本文介绍了如何在asp.net中为转发器排列颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

全部,



我想动态地为转发器的特定行着色。



请让我知道如何实现它。



感谢你



Mohd Wasif

All,

I want to color specific row of a repeater dynamically.

Please let me know how to implement it.

Thanking You

Mohd Wasif

推荐答案

您可以使用CSS。



如何:使用ASP.NET Repeater控件交替显示行颜色 [ ^ ]
You may use CSS.

How to: Alternate row color with the ASP.NET Repeater control[^]


这可以帮助您点击此处 [ ^ ]

如果您的Repeater在<部分>然后你可以申请以下风格:





#team section {

padding:5px 0 10px 0 ;

}

tr:nth-​​child(偶数){

背景:#FFF

}



tr:nth-​​child(单数){

背景:#E5F1FB

}
If your Repeater is within < Section > then you can apply the below style:


#team section {
padding: 5px 0 10px 0;
}
tr:nth-child(even) {
background: #FFF
}

tr:nth-child(odd) {
background: #E5F1FB
}


这篇关于如何在asp.net中为转发器排列颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆