首页 新闻 会员 周边

奇怪的Asp.net MVC,高不定的Css样式,请高手帮忙!!!

0
[已解决问题] 解决于 2008-10-31 19:08

我新建了一个Asp.net MVC程序,保留最简单的样式,在css里改了布局,颜色等,可以在设计试图里看到效果,但一运行,确是另一种效果。比如body的背景颜色怎么改都还是那种默认的海蓝色。

设计样子:

 运行样子:

css文件代码:

Code
Master母页代码:

Code

问题补充: <%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="ASP.NET.MVC.Views.Shared.Site" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title><%= Html.Encode(ViewData["Title"]) %></title> <link href="../../Content/Site.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="page"> <h1>Title</h1> <div class="column"> <asp:ContentPlaceHolder ID="LeftContent" runat="server"/> </div> <div class="column"> <asp:ContentPlaceHolder ID="MainContent" runat="server"/> </div> </div> </body> </html> master代码给错了,是上面这个
mrjiou的主页 mrjiou | 初学一级 | 园豆:200
提问于:2008-10-30 17:19
< >
分享
最佳答案
0

好像CSS的路径不对

你打开一个页面,然后根据页面的源代码中显示的CSS路径去访问一下那个CSS文件,肯定是访问不到,看一下,改成正确的就可以了

丁学 | 专家六级 |园豆:18730 | 2008-10-30 17:33
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册