为asp.net中的不同菜单项赋予不同的颜色 [英] giving different color to different menu items in asp.net

查看:60
本文介绍了为asp.net中的不同菜单项赋予不同的颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我正在使用asp的朋友:菜单
它的物品是这样的

ItemA
ItemB
ItemC
ItemD
ItemE
ItemF
ItemG

我想为菜单项ItemA和ItemE提供与其他菜单项不同的颜色.
是否可以使用CSS.
非常感谢您的帮助.谢谢大家.

hello friends i am working on an asp:menu
it''s items are like this

ItemA
ItemB
ItemC
ItemD
ItemE
ItemF
ItemG

i want to give a different color to menu item ItemA and ItemE from other menu items .
Is it possible using css.
Any help is really appreciated .Thanks in advance guys.

推荐答案

尝试一下...
try this...
<style type="text/css">
    .ItemA	
    {
   background-color:Orange;
   color:Black;
    }
    .ItemB	
    {
   background-color:White;
   color:Black;
    }
    .ItemC	
    {
   background-color:Green;
   color:Black;
    }
    </style>





<script type="text/javascript">


(函数(){


( " ).each( function (){// 此处menu1是我们的菜单ID
("#Menu1 ul li").each(function () { //here menu1 is ur menu id


这篇关于为asp.net中的不同菜单项赋予不同的颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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