首页 > 开发 > CSS > 正文

CssGaga教程:css合并与CSS优化

2024-07-11 09:02:34
字体:
来源:转载
供稿:网友

武林网(www.vevb.com)文章简介:CssGaga – css合并和CSS优化

CssGaga – css合并

勾选合并开启此功能
Before:

@import url("reset.import.source.css");@import url("grid.import.source.css");@import url("mod-1.source.css"); /* mod-1.source.css 中 @import url("media.source.css"); */@import url("mod-2.css");@import url("../mod-3.source.css");@import url("");

After:

@import url(media.css);@import url(mod-2.css);@import url(../mod-3.css);@import url();[reset.import.source.css 处理后的代码][grid.import.source.css 处理后的代码][mod-1.source.css 处理后的代码]

注:

CssGaga – css优化保留空格(IE6 bug)

Before:

.classname:first-letter { font-weight: bold; }.classname:first-line { font-weight: bold; }

After:

.classname:first-letter {font-weight:bold}.classname:first-line {font-weight:bold}中文字体Unicode编码

Before:

.classname { font-family: 宋体; }.classname { font-family: 黑体; }.classname { font-family: 微软雅黑; }

After:

.classname{font-family:/5B8B/4F53}.classname{font-family:/9ED1/4F53}.classname{font-family:/5FAE/8F6F/96C5/9ED1}

注:支持以上三种字体

删除不安全字体sans-serif(IE8 bug)

Before:

.classname { font-family: 宋体, sans-serif; }

After:

.classname{font-family:/5B8B/4F53}cursor生成根路径(IE6&7 bug)

Before:

{cursor:url('absolute/pre.cur'), auto;}

After:

{cursor:url(),auto}生成IE6 alpha滤镜

Before:

background-image:url(absolute/app-854x523.alpha.png);

After:

background-image:url(absolute/app-854x523.alpha.png);_background-image:none;_filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/files/allimg/110510/0702540.png',sizingMethod='crop');

注:

  • cur及png文件所在的absolute文件夹与css同级且引用时为相对路径
  • 需在配置文件里设置下面两项的对应关系<add key="pathSource" value="E:/isd_webrebuild_rep/qzonev5_proj/trunk/qzonestyle" /><add key="webSiteUrl" value="" />
  • 发表评论 共有条评论
    用户名: 密码:
    验证码: 匿名发表