Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个如下所示的菜单控件
菜单 1 菜单 2 菜单 3 菜单 4
如何为每个菜单设置单独的 ccs?menu1--css1 menu2--css2 menu3-css3 .. 像这样
谢谢。
如果我理解正确,您正在准备 4 个 css 文件,例如
.css1 { } .css2 { } .css3 { } .css4 { }
并且您的菜单项是men1 menu2 menu3 menu4,要实现此菜单,您必须在代码中使用repeater,因此从代码隐藏中,您可以附加css'<'e.item.itemindex'>'并将此css附加到您的控件。