开发者

Add css a:hover dynamically in VB code behind

depending on what data I retrieve from the database, I need to update the color of a menu item. This is no problem for me, device.Style.Add("background-color", "red") works just fine for me. However, when I change the background color, it overrides my CSS style sheet, which is supposed to change the color to light grey on a:hover. Is there a way to update what the a:hover 开发者_JS百科background color should be in my VB code? Thank you!!!


Use vb to attach a css class to the button. Then style that class to have the color you want.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜