MasterPages中的CSS [英] CSS in MasterPages

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

问题描述

我有一个母版页我想使用CSS样式表。我将链接标记

放在母版页标记中,如下所示< link href =" Styles / MyStyle.css"

rel =" stylesheet"类型= QUOT;文本/ CSS" />


当我查看使用母版页的内容页面

时,它在Visual Studio设计视图中工作正常。但是,当我运行我的网站应用程序时,

样式表标记神秘地消失了。有人有什么想法吗?这个

有点莫名其妙。

I have a master page I want to use a CSS stylesheet for. I put the link tag
in the master page markup, like this <link href="Styles/MyStyle.css"
rel="stylesheet" type="text/css" />

It works fine in Visual Studio design view when I look at a content page
that uses the master page. However, when I run my web site app, the
stylesheet markup mysteriously disappears. Does anybody have any ideas? This
is kind of baffling.

推荐答案

内容页面是否与主文件夹不同页?在你的css链接中尝试一个

绝对路径。或者更好的是,使用主题。


" Rbrt" < Rb ** @ discussion.microsoft.com写信息

新闻:D1 ************************** ******** @ microsof t.com ...
Is the content page in a different folder than the master page? Try an
absolute path in your css link. Or better yet, use Themes.

"Rbrt" <Rb**@discussions.microsoft.comwrote in message
news:D1**********************************@microsof t.com...

>我有一个母版页我想使用CSS样式表。我将链接标记

放在母版页标记中,如下所示< link href =" Styles / MyStyle.css"

rel =" stylesheet"类型= QUOT;文本/ CSS" />


当我查看使用母版页的内容页面

时,它在Visual Studio设计视图中工作正常。但是,当我运行我的网站应用程序时,

样式表标记神秘地消失了。有没有人有什么想法?

这个

有点莫名其妙。
>I have a master page I want to use a CSS stylesheet for. I put the link tag
in the master page markup, like this <link href="Styles/MyStyle.css"
rel="stylesheet" type="text/css" />

It works fine in Visual Studio design view when I look at a content page
that uses the master page. However, when I run my web site app, the
stylesheet markup mysteriously disappears. Does anybody have any ideas?
This
is kind of baffling.


两者都在同一个文件夹。我试过用主题。那也不行。




" Scott Roberts"写道:
Both are in the same folder. I''ve tried to use themes. That doesn''t work
either.

"Scott Roberts" wrote:

内容页面是否与母版页不同?在你的css链接中尝试一个

绝对路径。或者更好的是,使用主题。


" Rbrt" < Rb ** @ discussion.microsoft.com写信息

新闻:D1 ************************** ******** @ microsof t.com ...
Is the content page in a different folder than the master page? Try an
absolute path in your css link. Or better yet, use Themes.

"Rbrt" <Rb**@discussions.microsoft.comwrote in message
news:D1**********************************@microsof t.com...

我有一个母版页我想使用CSS样式表。我将链接标记

放在母版页标记中,如下所示< link href =" Styles / MyStyle.css"

rel =" stylesheet"类型= QUOT;文本/ CSS" />


当我查看使用母版页的内容页面

时,它在Visual Studio设计视图中工作正常。但是,当我运行我的网站应用程序时,

样式表标记神秘地消失了。有没有人有任何想法?

这个

有点莫名其妙。
I have a master page I want to use a CSS stylesheet for. I put the link tag
in the master page markup, like this <link href="Styles/MyStyle.css"
rel="stylesheet" type="text/css" />

It works fine in Visual Studio design view when I look at a content page
that uses the master page. However, when I run my web site app, the
stylesheet markup mysteriously disappears. Does anybody have any ideas?
This
is kind of baffling.



令人沮丧的是,如果我使用主题并查看
$ b $的来源b页面我可以看到样式表正在按原样涂上。

它只是没有做任何事情。


"斯科特罗伯茨写道:
What is frustrating is that if I use themes and look at the source of the
page I can see that the Styleheet is being inked in as it is supposed to be.
It just isn''t doing anything.

"Scott Roberts" wrote:

内容页面是否与母版页不同?在你的css链接中尝试一个

绝对路径。或者更好的是,使用主题。


" Rbrt" < Rb ** @ discussion.microsoft.com写信息

新闻:D1 ************************** ******** @ microsof t.com ...
Is the content page in a different folder than the master page? Try an
absolute path in your css link. Or better yet, use Themes.

"Rbrt" <Rb**@discussions.microsoft.comwrote in message
news:D1**********************************@microsof t.com...

我有一个母版页我想使用CSS样式表。我将链接标记

放在母版页标记中,如下所示< link href =" Styles / MyStyle.css"

rel =" stylesheet"类型= QUOT;文本/ CSS" />


当我查看使用母版页的内容页面

时,它在Visual Studio设计视图中工作正常。但是,当我运行我的网站应用程序时,

样式表标记神秘地消失了。有没有人有任何想法?

这个

有点莫名其妙。
I have a master page I want to use a CSS stylesheet for. I put the link tag
in the master page markup, like this <link href="Styles/MyStyle.css"
rel="stylesheet" type="text/css" />

It works fine in Visual Studio design view when I look at a content page
that uses the master page. However, when I run my web site app, the
stylesheet markup mysteriously disappears. Does anybody have any ideas?
This
is kind of baffling.



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

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