.NET4.0中CSS的问题
我在CSS中添加了一个背景图片,在设计视图里可以看到效果,如下图:
而用浏览器打开却看不到背景图了,如下图:
我的CSS代码:
body
{
font-family: Verdana;
font-size: 12px;
line-height: 1.5;
}
a
{
color: #000;
text-decoration: none;
}
a:hover
{
color: #F00;
}
#menu
{
width: 150px;
margin: 0 auto;
height: 26px;
background: #eee;
}
#menu ul
{
list-style: none;
margin: 0px;
padding: 0px;
width: 156px;
height: 25px;
}
#menu ul li
{
float:left;
}
#menu ul li a
{
display: block;
padding: 0px 20px;
height: 26px;
line-height: 26px;
float: left;
background:url(../Images/Login/091033_nav_bg2.gif) 0 0 no-repeat;
}
#menu ul li a:hover
{
background:url(../Images/Login/091033_nav_bg3.gif) 0 0 no-repeat;
color: #fff;
}
#menu ul li a.current { background:url(../Images/Login/091033_nav_bg1.gif) 0 0 no-repeat; font-weight:bold; color:#fff;}
.div1
{
margin-left:1000px;
height: 50px;
float:left;
}
#head1
{
background:url(../Images/Login/bg.png) 949 86 no-repeat;
margin:0px auto;
width:949px;
height:86px;
}
我的页面源码:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Account_Login" %>
<!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">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link type="text/css" href="../Theme/Login.css" rel="Stylesheet" rev="Stylesheet" />
</head>
<body>
<form id="form1" runat="server">
<div id="head1">
你好
</div>
<div id="menu">
<ul>
<li><a class="current" href="Login.aspx">首页</a></li>
<li><a href="Download.aspx">软件下载</a></li>
</ul>
</div>
<div class="div1">
<div id="text1" class="text1">用户名:<input id="username" class="username" type="text"/></div>
<div id="text2" class="text1">密码:<input id="password" class="password" type="password"/></div