日期:2014-05-18  浏览次数:20480 次

aspx引入样式表的问题
美工做好页面,样式没有问题。我把页面转成aspx后,样式没有了。除非把
<link href="css/index.css" rel="stylesheet" type="text/css" />
转成
<link href="../css/index.css" rel="stylesheet" type="text/css" />
是不是aspx引用css时找不到路径啊??这个问题遇到很多次了。

------解决方案--------------------
你试下<link href="/css/index.css" rel="stylesheet" type="text/css" /> 

或你用VS2005以上的版本话直接用THEME文件夹
然后在page_preInit里指明theme就可以了

------解决方案--------------------
路径问题,~/***
------解决方案--------------------
~/
------解决方案--------------------
使用theme,你无需写<link>代码。只要在
HTML code
<%@ Page %>