asp.net菜单使用CSS [英] asp.net Menus use css

查看:92
本文介绍了asp.net菜单使用CSS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用asp.menu控件.
它与数据库(sqlserver)绑定

我必须使用CSS来应用它,该怎么办?
我没有任何CSS,也不擅长创建!!
动态菜单上是否有任何CSS代码可以应用??

我的问题是Need Css,以及如何在Dynamic Asp上应用.

i m working with asp.menu controlls.
its bound with database (sqlserver)

I have to use css to apply on it how should i do that ??
I dont have any css and not good at creating !!
Is there any css code to apply on dynamic menus???

My question is Need Css and How to apply on Dynamic Asp.menus???

推荐答案

在开发之前,您需要先阅读一本好书!

每个ASP.NET服务器控件都有一个属性``CssClass''
在运行时,当动态生成菜单项时,只需将css类添加到菜单中,或者将更特定的css添加到菜单项中.

现在,从拥有这些CSS类之前的项目中添加CSS样式表.您可以在运行前或运行时添加对此CSS样式表的引用!

在此处阅读有关CSS的信息: http://www.csstutorial.net/ [ http://www.w3schools.com/ [ ^ ]
http://www.beansoftware.com/asp.net-tutorials/css-asp. net.aspx [^ ]
You need a good book to read first before development!

Every ASP.NET server control has a property ''CssClass''
At runtime, when you generate menu items dynamically, just add the css class to the menu or more specific css to menu items.

Now you add a CSS stylesheet in your project from before having those css classes. You can add a reference to this CSS Stylesheet either from before or at runtime!

Read about CSS here:http://www.csstutorial.net/[^]
http://www.w3schools.com/[^]
http://www.beansoftware.com/asp.net-tutorials/css-asp.net.aspx[^]


Sandeep提出的任何答案都是正确的.我只想在此处添加一些要点.

您可以看一下 CSS Friendly Menu Adpater,它对于CSS的实现更为方便.由于ASP.NET菜单呈现为
Whatever answer has suggested by Sandeep is correct. I just wanted to add few point overhere.

You can have a look into CSS Friendly Menu Adpater, which is much more handy for CSS implementation. As ASP.NET Menu is rendered into
TR-TD

.有时会导致CSS问题.

因此,请看一下CSS Friendly Menu Adapter.
http://www.asp.net/CssAdapters/ [

. Which some times creates issue with CSS.

So, have a look into CSS Friendly Menu Adapter.
http://www.asp.net/CssAdapters/[^]

You will find many more sample in net.

Hope this will help you

Thanks !


这篇关于asp.net菜单使用CSS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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