表单的内联样式或类 [英] Inline style or class for Forms

查看:84
本文介绍了表单的内联样式或类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个包含大量表单的asp.net应用程序。

我不想使用表来设计Form,因为它对我来说似乎不灵活。

相反,我正在使用CSS样式。但是,每个Web控件的每个css类都太多了。

什么是更好的主意?我应该使用类或内联样式吗?

解决方案

构建一组可应用于每个网格的类。这正是类的意思。



如果你想要对表单中的某些特定网格做一些额外的操作,那么只为表创建自定义css表那些特殊的网格。仅将它们应用于这些网格。



了解有关使用CSS的更多信息此处 [ ^ ]。


使用CSS样式Web表单 [ ^ ]

I am building a asp.net application which has a bunch of forms.
I don't want to use table for designing Form, as it doesn't seem to be flexible to me.
Instead, I am using CSS styles. But, each css class for each web control is too much.
What's the better idea ? Should I use class or inline style ?

解决方案

Build a set of classes that can be applied to every grid. This is exactly what classes are meant for.

If there is something additional that you want to do with some specific grids within your form, then create custom css sheets only for those particular grids. Apply them only to those grids.

Read more about using CSS here[^].


Get the idea from Style Web Forms Using CSS[^]


这篇关于表单的内联样式或类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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