您的位置:首页 > 运维架构

.NET DropdownList 不同条目设置背景色和字体颜色

2013-08-08 15:06 447 查看
可以为dropdownlist设置不同的颜色,使用Attribute实现

ddlCompany.Items[1].Attributes.Add("style", "background-color: red");

ddlCompany.Items[2].Attributes.Add("style", "color: blue");

ddlCompany.Items[3].Attributes.Add("style", "color: yellow");
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: