如何从母版页为所有相同的id标签设置css类?
Hi Team,
在我的网络应用程序中,我有近50页。在我的大多数页面中有许多相同ID的标签,例如lblmessage,lblError,lblSucess lblfailed
现在我想为这个标签设置一个css clas应用程序。
因此,我想知道是否有任何方式可以从主页中获取此ID,因为我知道这些ID几乎在所有网页上都是相同的页面和设置css类一次..
请建议..
Hi Team ,
In my web applications i have almost 50 pages . And There are many labels of same ids in my most pages such as lblmessage, lblError, lblSucess lblfailed
Now i want to set one css clas for this labels through out the application.
So insted of going through each page and make changes i was wondering if there is any way where i woudld fetch this id from master pages as i know these ids name which is same on almost all web pages and set css class at once ..
Please suggest ..
当你有一个母版页,所以很容易。
在母版页中链接一个外部CSS文件。在那个CSS文件中,只需写下面的类......
As you are having a Master Page, so it will be easy.
Link one External CSS file in Master Page. In that CSS file, just write classes like below...
#lblmessage, #lblError, #lblSucess
{
/*All CSS properties.*/
}
这将帮助您定义具有上述ID的所有标签的CSS属性。
如果您需要单个标签的CSS,那么您也可以这样做。
This will help you to define CSS properties for all the Labels having the above ids.
If you need individual CSS for individual Label, then you can also do that.