我在解决方案中添加了一个主题,在主题中有一个样式表文件和一个Images文件夹。程序运行时显示不了背景图片,但单独用txt文件写,然后用IE打开它,却可以正确显示,不知道是什么原因?样式表文件内容:(只对body标签设置了样式)body
{
background-image: url(App_Themes/Default/Images/bg.gif);
margin: 20 0 0 0;
background-repeat: repeat;
background-position: center 50%;
}default.aspx页面内容:<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" Theme="Default" StylesheetTheme="Default" %><!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>无标题页</title>
</head><body><form id="form1" runat="server">
    <div >
<center>
<strong>设置背景图片</strong>
</center>
    </div></form></body>
</html>