网络编程 | 站长之家 | 网页制作 | 图形图象 | 操作系统 | 冲浪宝典 | 软件教学 | 网络办公 | 手机学院 | 邮件系统 | 网络安全 | 认证考试
Firefox | IE | Maxthon | 迅雷 | 电驴 | BitComet | FlashGet | QQ | QQ空间 | Vista | 输入法 | Ghost | Word | Excel | wps | Powerpoint
asp | .net | php | jsp | Sql | c# | Ajax | xml | Dreamweaver | FrontPages | Javascript | css | photoshop | fireworks | Flash | Cad | Discuz!
当前位置 > 网站建设学院 > 网络编程 > ASP.NET技巧
Tag:注入,存储过程,分页,安全,优化,xmlhttp,fso,jmail,application,session,防盗链,stream,无组件,组件,md5,乱码,缓存,加密,验证码,算法,cookies,ubb,正则表达式,水印,索引,日志,压缩,base64,url重写,上传,控件,Web.config,JDBC,函数,内存,PDF,迁移,结构,破解,编译,配置,进程,分词,IIS,Apache,Tomcat,phpmyadmin,Gzip,触发器,socket
网络编程:ASP教程,ASP.NET教程,PHP教程,JSP教程,C#教程,数据库,XML教程,Ajax,Java,Perl,Shell,VB教程,Delphi,C/C++教程,软件工程,J2EE/J2ME,移动开发
本月文章推荐
.如何在.NET中访问MySQL数据库.
.结合JavaScript与ASP.NET Web窗体.
..net2.0邮件发送代码.
.在ASP.NET中上传图片并生成缩略图.
.asp.net2.0 上传图片并为用户创建.
.在asp.net中为Web用户控件添加属.
.Asp.net取得页面执行时间的代码 .
..Net中如何操作IIS(原理篇).
.有趣的lucene.net索引.
.使用ASP.NET Atlas编写显示真实进.
.asp.net 2的文件上传.
.Asp.net中如何过滤html,js,css代.
.编写简单的中文分词程序 .
.收藏一段小的.net下的验证码片段.
.asp.net关于文件在数据库的存入和.
.简单而又复杂的ASP.NET编程模型 .
.数据回发时,维护ASP.NET Tree控.
.通过反射填充泛型集合List的静态.
.将以前写的SQL2分查找法通用分页.
.使用.NET实现断点续传.

关于.net中页面CSS样式丢失的解决方案

发表日期:2008-12-12

最近在做一使用.net开发小站点的时候,发现放入.net代码之后页面特定区域定义好的CSS样式莫名其妙的没了,找了很多方法,结果发现居然是CSS里的注释惹的祸。
原CSS代码如下view plaincopy to clipboardprint?
/*右侧区域*/ 
.RightPart{width:230px;margin-top:10px;}  
.RightPart{text-align:left;}  
.RightPart .Title{background:url(../images/RightPartTitle.gif) no-repeat left top;padding-left:32px;height:47px;}  
.RightPart .TitleR{background:url(../images/RightPartTitleRed.gif) no-repeat left top;padding-left:32px;height:47px;}  
.RightPart .TitleG{background:url(../images/RightPartTitleG.gif) no-repeat left top;padding-left:32px;height:47px;}  
.RightPart h3{font-size:14px;color:#FFF;}  
.RightPart .LeftBorder{width:8px;background:url(../images/make_default_2_1.jpg) repeat-y left top;}  
.RightPart .RightBorder{width:9px;background:url(../images/make_default_2_2.jpg) repeat-y right top;}  
.RightPart .Content{width:205px;padding:0 5px;}  
.RightPart ul{list-style:none;}  
.RightPart li{display:block;background:url(../images/page_story_icon_ball.jpg) no-repeat left 3px;padding:3px 0 3px 15px;}  
/*地图分类*/ 
.RightPart .Category li{font-size:16px;font-weight:bold;background:url(../images/page_story_icon_ball.jpg) no-repeat left 5px;margin:4px 0 4px 10px;}  
.RightPart .Category .Line{background:left top;padding:0;margin:0 0 0 3px !Important;margin:-13px 0 0 3px;width:auto;height:4px;} 

/*右侧区域*/
.RightPart{width:230px;margin-top:10px;}
.RightPart{text-align:left;}
.RightPart .Title{background:url(../images/RightPartTitle.gif) no-repeat left top;padding-left:32px;height:47px;}
.RightPart .TitleR{background:url(../images/RightPartTitleRed.gif) no-repeat left top;padding-left:32px;height:47px;}
.RightPart .TitleG{background:url(../images/RightPartTitleG.gif) no-repeat left top;padding-left:32px;height:47px;}
.RightPart h3{font-size:14px;color:#FFF;}
.RightPart .LeftBorder{width:8px;background:url(../images/make_default_2_1.jpg) repeat-y left top;}
.RightPart .RightBorder{width:9px;background:url(../images/make_default_2_2.jpg) repeat-y right top;}
.RightPart .Content{width:205px;padding:0 5px;}
.RightPart ul{list-style:none;}
.RightPart li{display:block;background:url(../images/page_story_icon_ball.jpg) no-repeat left 3px;padding:3px 0 3px 15px;}
/*地图分类*/
.RightPart .Category li{font-size:16px;font-weight:bold;background:url(../images/page_story_icon_ball.jpg) no-repeat left 5px;margin:4px 0 4px 10px;}
.RightPart .Category .Line{background:left top;padding:0;margin:0 0 0 3px !Important;margin:-13px 0 0 3px;width:auto;height:4px;}  丢失的就是“/*地图分类*/”下面两行的CSS效果。
  把“/*地图分类*/”的注释去除了,结果F5一下居然发现页面正常了  看来之前遇到的问题也是一样啊。

  方案总结
  如果在.net加代码的时候发现定义CSS样式效果丢失,在确定没有其它问题的情况下试着删除一些丢失样式附近的CSS注释,就可以解决问题。

上一篇:使用DES对称加密代码,支持中文 人气:202
下一篇:FCKeditor 2.3 在ASP.NET中文件上传路径的设置 人气:277
浏览全部CSS样式丢失的内容 Dreamweaver插件下载 网页广告代码 2009年新年快乐