asp.net母版页css [英] asp.net master page css

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

问题描述

如何限制母版页中可用的子页中的CSS样式?

how to restrict the css style in child page which is available in master page?

推荐答案

一种方法是覆盖样式.优先是优先的:在Google上进行研究,您会找到答案.
One way is to override the style. Overriding is about precedence: do your research on Google and you will find the answer.


据我所知,您有两个CSS.一个用于母版页,另一个用于子页.而且您想在子页面中禁用特定元素的样式.
此问题有两种情况.
首先:-您要在所有子页面中使用在maste页面的css中定义的样式,然后从为子页面定义的css文件中删除该元素的样式条目.
第二:-您只希望仅在一个特定页面中限制样式.然后,在这种情况下,您必须提供内联样式或在标题contentpalaceholder中提及样式,其样式定义与母版页css文件中的样式定义相同.由于这些文件具有比链接的css文件更高的优先级.
致以诚挚的问候.
维卡斯·维玛(Vikas Verma)
As I can understand you have two css. One for master page and other for child pages. And you want to disable the style of a particular element in a child page.
There are two cases of this problem.
FIRST:- You want to use the style defined in maste page''s css in all child pages, then remove the style entry for that element from the css file that is defined for the child pages.
SECOND:- You just want t restrict the style only in one particular page. Then in that case you have to either provide the inline style or mention the style in the header contentpalaceholder, having same style defination as that in the master page''s css file. As these have higher priority then the linked css files.
Warm regards.
Vikas Verma


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

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