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

问题描述

如何在asp.net的母版页中使用CSS模板?请告诉我它的过程

How can I use css template with master page in asp.net?? please tell me its procedure

推荐答案

Hi,check the codee
<div id="container"> <div id="center" class="column"> <div class="code">

<%@ Master Language="VB" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
    <link href="StyleSheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<div>
 <asp:contentplaceholder id="ContentPlaceHolder1" runat="server">
 </asp:contentplaceholder>
</div>

    </form>
</body>
</html>

check the bold part of the code for adding css in master page
</div> </div> </div>


<head> </head>

标签.

tag.

<link href="WebStyle.css" rel="stylesheet" type="text/css" />



有关样式表的更多信息,请单击链接

http://www.w3.org/TR/html4/present/styles.html [ ^ ]
http://www.thewebseye.com/creating-a-stylesheet.htm [ ^ ]
http://meyerweb.com/eric/articles/webrev/199710.html [ ^ ]

谢谢



For more learning about stylesheet follow the links

http://www.w3.org/TR/html4/present/styles.html[^]
http://www.thewebseye.com/creating-a-stylesheet.htm[^]
http://meyerweb.com/eric/articles/webrev/199710.html[^]

Thanks


<configuration>
 <system.web>
    <compilation debug="true" targetframework="4.0" />
    <pages theme="Theme1" />
 </system.web>
</configuration>



就这样



that''s all


这篇关于在asp.net中使用母版页面来访问CSS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 14:51