我需要为我的网站设置背景,以便母版页的每个 Web 表单子项都显示背景图像。我用谷歌搜索并找到了一些答案,但他们没有做任何事情。我附上了我的母版页 html 代码和显示我想要的背景的图像:
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="Pages_MasterPage" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Qwik ProjecTrace</title>
<asp:ContentPlaceHolder id="head" runat="server">
</asp:ContentPlaceHolder>
<style type="text/css">
.style1
{
width: 100%;
}
.style2
{
text-align: center;
font-size: 40pt;
color: #0066CC;
}
.style3
{
font-size: x-large;
}
body
{
background:url('/style/images/IMS-Backgroung.jpg') no-repeat left top;
}
</style>
<link href="../Style/site.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</asp:ToolkitScriptManager>
<table class="style1">
<tr>
<td runat="server" style="direction: ltr">
<asp:Image ID="mes1" runat="server" style="text-align: left" />
</td>
<td class="style2">
<strong style="font-size: 40">Qwik ProjecTrace<br />
<span class="style3">you see what we do 24/7</span></strong></td>
<td runat="server" style="direction: rtl">
<asp:Image ID="mes2" runat="server" style="text-align: right" />
</td>
</tr>
</table>
<div>
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
<p></p>
</asp:ContentPlaceHolder>
</div>
</form>
</body>
</html>
有谁知道我的代码有什么问题?以及如何设置背景?
提前谢谢