本文介绍了如何从母版页应用内容页面css的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
asp .net的新面孔。现在我创建一个母版页和内容页面。内容页面显示在contentplaceholder。但是css不适用于内容页面。我试试这个
在Master Page
< / head>
Hi all,
Am very new face for asp .net. Now i create one master page and content page. Content page displayed at contentplaceholder. But css is not apply for content page. Am try this one
At Master Page
</head>
<link href="css/career.css" rel="stylesheet" type="text/css"/>
<asp:ContentPlaceHolder id="head" runat="server">
</asp:ContentPlaceHolder>
在内容页面
At Content Page
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<link href="../css/career.css" rel="stylesheet" type="text/css" media="screen" runat="server" />
<div id="whole">
欢迎所有回复....
谢谢和问候,
Dhineshkumar Velmayil。
All replies are welcome....
Thanks and Regards,
Dhineshkumar Velmayil.
推荐答案
<head id="Head1" runat="server">
<link href="Styles/MainPage.css" rel="stylesheet" type="text/css" />
<body>
然后你可以在aspx页面中轻松使用你的css属性。
Then you can easily use your css properties in aspx pages.
这篇关于如何从母版页应用内容页面css的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!