我如何仅在母版页中使用Css,而内容页面不得使用它 [英] How I use Css only in master page and the content page must not use it

查看:93
本文介绍了我如何仅在母版页中使用Css,而内容页面不得使用它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何仅在母版页中使用Css,而内容页面不得使用它

How I use Css only in master page and the content page must not use it

推荐答案

为此,您必须只使用类选择器。仅将类应用于您想要的那些控件,其他控件将自动排除到该css类。
For that you have to use only class selector . Apply classes only to those controls which you want , Other controls automatically will be excluded to that css class.


创建两个不同的CSS文件。

一个用于母版页,另一个用于内容页面。



确保。两个CSS都有不同的CSS类。



-KR
Create two different CSS files.
One for Master Page & another one for Content page.

Make sure. both the CSS have different CSS classes.

-KR


你需要以这种方式设计页面。定义 css 类,这些类也用于母版页而不是内容页。
You need to design the page in that way. Define css classes which are also used in Master Page and not in content pages.


这篇关于我如何仅在母版页中使用Css,而内容页面不得使用它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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