本文为大家分享了asp.net利用母版制作页脚的具体过程,供大家参考,具体内容如下
1.母版创建流程略过。
2.创建母版页css:Site.css
1
2
3
4
5
6
|
body {
}
.linkButton{
text-decoration:none;
color:whitesmoke;
}
|
3.母版页添加页脚。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
<!DOCTYPE html>
< html xmlns = "http://www.w3.org/1999/xhtml" >
< head runat = "server" >
< meta http-equiv = "Content-Type" content = "text/html; charset=utf-8" />
< title ></ title >
< asp:ContentPlaceHolder ID = "head" runat = "server" >
</ asp:ContentPlaceHolder >
<!-- 引用指定css文件 -->
< link href = "Css/Site.css" rel = "external nofollow" rel = "stylesheet" type = "text/css" />
</ head >
< body >
< form id = "form1" runat = "server" >
< div >
< asp:ContentPlaceHolder ID = "ContentPlaceHolder1" runat = "server" >
</ asp:ContentPlaceHolder >
</ div >
< hr />
<!-- 页脚标签:footer -->
< footer >
< div style = "background-color: #2A3A56; line-height: 100px; text-decoration:none" >
< div style = "text-align:center" >
< asp:HyperLink class = "linkButton" ID = "AboutUs" Text = "关于我们|" runat = "server" />
< asp:HyperLink class = "linkButton" ID = "ConnectUs" Text = "联系我们|" runat = "server" />
< asp:HyperLink class = "linkButton" ID = "Statement1" Text = "网站声明|" NavigateUrl = "~/Admin/Statement.aspx" runat = "server" />
< asp:HyperLink class = "linkButton" ID = "Statement2" Text = "法律声明" NavigateUrl = "~/Admin/Statement.aspx" runat = "server" />
</ div >
</ div >
</ footer >
</ form >
</ body >
</ html >
|
4.创建Default.aspx页面和 HyperLink 相关 连接界面。
5.测试效果如下。
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持服务器之家。