在成都做网站、成都建网站,成都网站建设及网页制作,首选领城互动
  • 首页
  • 关于我们
  • 服务范围
  • 经典案例
  • 联系我们
当前位置:首页 > 服务项目 > 品牌形象设计 > 巧用外部js解决设计中的css hack!

巧用外部js解决设计中的css hack!

网站设计好了,设计师准备交稿。在ie6里面显示正常,但拿到ie7.8里面,就面目全非了。这种情况,我们专业人士认为是css hack问题。为什么有这种说法呢,css hack就是不同的浏览器,对css语句的解释和执行结果不一样。导致他们的样式有差别。
但是,工期较紧,不能做大面积改变的我们怎么办呢?

         其实,设计界的前辈早就总结出了解决这些问题的经验。不妨先试试它们。

只需要使用一小段简单的JS代码即可轻松解决这一问题。

 

         IE7网站设计JS代码为:

 

<!–[ifltIE7]> <scriptsrcscriptsrc=”http://ie7-js.googlecode.com/svn/version/2.0(beta3)/IE7.js”type=”text/javascript”></< span>script> <![endif]–>

 

          IE8网站设计JS代码为:

 

<!–[ifltIE8]> <scriptsrcscriptsrc=”http://ie7-js.googlecode.com/svn/version/2.0(beta3)/IE8.js”type=”text/javascript”></< span>script> <![endif]–>

 

         原理为调用一个在GoogleCode上的项目。

 

        如果我们的网站设计作品在IE7上没有问题,IE8上显示有问题,而我们又不想做大量的修改,加重网站设计工作量,那么只需要加入

 

<metahttp-equivmetahttp-equiv="x-ua-compatible"content="IE=7"/> 

 

亲,作为设计师的你,这些应该能看懂吧。呵呵!


    电话:028-85030041
    地址:中国成都新希望国际A座
    ©Linking 2006-2021 Inc.
    蜀ICP备12000250号-1
Process: 0.040s ( Load:0.005s Init:0.012s Exec:0.018s Template:0.005s ) | DB :13 queries 0 writes | UseMem:2,067 kb
页面Trace信息
当前页面 : /vi/201201/122.html
模板缓存 : C:\wwwroot\www.citycy.com/data/front/runtime/cache/351ab735e880a1dd5f3567d38b061acb.php
请求方法 : GET
通信协议 : HTTP/1.1
请求时间 : 2023-02-03 07:29:54
用户代理 : CCBot/2.0 (https://commoncrawl.org/faq/)
会话ID : 5gg9ud91almv0u6nhlbvsmhpd2
日志记录 : 61条日志
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [8192] mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead DbMysql.class.php 第 62 行.
[ 2023-02-03T07:29:54+08:00 ] SQL: RunTime:0.000749s SQL = SHOW COLUMNS FROM citycy_category
[ 2023-02-03T07:29:54+08:00 ] SQL: RunTime:0.000091s SQL = SELECT `catid` FROM `citycy_category` WHERE `catdir`='vi' LIMIT 1
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [8192] preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead functions.php 第 118 行.
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [2048] Only variables should be assigned by reference FbaseAction.class.php 第 68 行.
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [8] Undefined index: forward FbaseAction.class.php 第 69 行.
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [8192] preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead common.php 第 79 行.
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [8] Undefined index: userdata FbaseAction.class.php 第 105 行.
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [8] Undefined index: userdata FbaseAction.class.php 第 105 行.
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [2048] Declaration of ContentModel::add() should be compatible with Model::add($data = '', $options = Array) ContentModel.class.php 第 507 行.
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [2048] Declaration of ContentModel::delete() should be compatible with Model::delete($options = Array) ContentModel.class.php 第 507 行.
[ 2023-02-03T07:29:54+08:00 ] SQL: RunTime:0.000690s SQL = SHOW COLUMNS FROM citycy_content
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [8192] mysql_escape_string(): This function is deprecated; use mysql_real_escape_string() instead. DbMysql.class.php 第 400 行.
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [8192] mysql_escape_string(): This function is deprecated; use mysql_real_escape_string() instead. DbMysql.class.php 第 400 行.
[ 2023-02-03T07:29:54+08:00 ] SQL: RunTime:0.000554s SQL = SELECT `cid` FROM `citycy_content` WHERE ( `url` = '201201/122.html' ) AND ( `status` = '9' ) LIMIT 1
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [8192] mysql_escape_string(): This function is deprecated; use mysql_real_escape_string() instead. DbMysql.class.php 第 400 行.
[ 2023-02-03T07:29:54+08:00 ] SQL: RunTime:0.000445s SQL = SELECT * FROM `citycy_content` WHERE ( `url` = '201201/122.html' ) LIMIT 1
[ 2023-02-03T07:29:54+08:00 ] SQL: RunTime:0.000516s SQL = SHOW COLUMNS FROM citycy_content_article
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [8192] mysql_escape_string(): This function is deprecated; use mysql_real_escape_string() instead. DbMysql.class.php 第 400 行.
[ 2023-02-03T07:29:54+08:00 ] SQL: RunTime:0.000187s SQL = SELECT * FROM `citycy_content_article` WHERE ( `cid` = '122' ) LIMIT 1
[ 2023-02-03T07:29:54+08:00 ] SQL: RunTime:0.000540s SQL = SHOW COLUMNS FROM citycy_model_field
[ 2023-02-03T07:29:54+08:00 ] SQL: RunTime:0.000079s SQL = SELECT `fieldid` FROM `citycy_model_field` WHERE `status`='1' AND `modelid`='1'
[ 2023-02-03T07:29:54+08:00 ] SQL: RunTime:0.000440s SQL = SHOW COLUMNS FROM citycy_content_tag
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [8192] mysql_escape_string(): This function is deprecated; use mysql_real_escape_string() instead. DbMysql.class.php 第 400 行.
[ 2023-02-03T07:29:54+08:00 ] SQL: RunTime:0.000318s SQL = SELECT citycy_tag.name FROM `citycy_content_tag` LEFT JOIN citycy_tag ON (citycy_tag.tagid=citycy_content_tag.tagid) WHERE ( citycy_content_tag.keyid = 'c-122' ) ORDER BY citycy_tag.tagid DESC
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [2] Invalid argument supplied for foreach() ContentModel.class.php 第 416 行.
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [8] Undefined variable: value Field.class.php 第 199 行.
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [8] Undefined variable: value Field.class.php 第 197 行.
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [8] Undefined variable: value Field.class.php 第 197 行.
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [2] strpos(): Empty needle ThumbField.class.php 第 21 行.
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [8] Undefined variable: value Field.class.php 第 197 行.
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [8] Undefined variable: value Field.class.php 第 197 行.
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [8] Undefined variable: value Field.class.php 第 197 行.
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [8] Undefined variable: value Field.class.php 第 197 行.
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [8] Undefined variable: value Field.class.php 第 197 行.
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [8] Undefined index: p FbaseAction.class.php 第 262 行.
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [8] Undefined index: p FbaseAction.class.php 第 262 行.
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [8] Undefined index: p FbaseAction.class.php 第 262 行.
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [8] Undefined index: p FbaseAction.class.php 第 262 行.
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [8] Undefined index: p FbaseAction.class.php 第 262 行.
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [8] Undefined index: p FbaseAction.class.php 第 262 行.
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [8] Undefined index: p FbaseAction.class.php 第 262 行.
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [8] Undefined index: p FbaseAction.class.php 第 262 行.
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [8] Undefined index: p FbaseAction.class.php 第 262 行.
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [8] Undefined index: p FbaseAction.class.php 第 262 行.
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [8] Undefined index: p FbaseAction.class.php 第 262 行.
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [8] Undefined index: p FbaseAction.class.php 第 262 行.
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [8] Undefined index: p FbaseAction.class.php 第 262 行.
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [8] Undefined index: p FbaseAction.class.php 第 262 行.
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [8] Undefined index: p FbaseAction.class.php 第 262 行.
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [8] Undefined index: p FbaseAction.class.php 第 262 行.
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [8] Undefined index: p FbaseAction.class.php 第 262 行.
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [8] Undefined index: p FbaseAction.class.php 第 262 行.
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [8] Undefined index: p FbaseAction.class.php 第 262 行.
[ 2023-02-03T07:29:54+08:00 ] SQL: RunTime:0.000092s SQL = SELECT * FROM `citycy_content` WHERE sort<1 AND catid=11 ORDER BY sort DESC LIMIT 1
[ 2023-02-03T07:29:54+08:00 ] SQL: RunTime:0.000077s SQL = SELECT * FROM `citycy_content` WHERE sort>1 AND catid=11 ORDER BY sort ASC LIMIT 1
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [2] Missing argument 1 for Ad::__construct(), called in C:\wwwroot\www.citycy.com\include\library\ThinkPHP\Common\functions.php on line 259 and defined Ad.class.php 第 40 行.
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [2] Missing argument 2 for Ad::__construct(), called in C:\wwwroot\www.citycy.com\include\library\ThinkPHP\Common\functions.php on line 259 and defined Ad.class.php 第 40 行.
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [8] Undefined variable: type Ad.class.php 第 41 行.
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [8] Undefined variable: setting Ad.class.php 第 42 行.
[ 2023-02-03T07:29:54+08:00 ] NOTIC: [8] Undefined variable: html Ad.class.php 第 136 行.
加载文件 : 76
[0] => C:\wwwroot\www.citycy.com\index.php
[1] => C:\wwwroot\www.citycy.com\define.php
[2] => C:\wwwroot\www.citycy.com\include\library\ThinkPHP\ThinkPHP.php
[3] => C:\wwwroot\www.citycy.com\include\library\ThinkPHP\Common\runtime.php
[4] => C:\wwwroot\www.citycy.com\include\library\ThinkPHP\Common\defines.php
[5] => C:\wwwroot\www.citycy.com\front\Conf\paths.php
[6] => C:\wwwroot\www.citycy.com\front\Conf\core.php
[7] => C:\wwwroot\www.citycy.com\include\library\ThinkPHP\Common\functions.php
[8] => C:\wwwroot\www.citycy.com\include\library\ThinkPHP\Lib\Think\Core\Think.class.php
[9] => C:\wwwroot\www.citycy.com\include\library\ThinkPHP\Lib\Think\Exception\ThinkException.class.php
[10] => C:\wwwroot\www.citycy.com\include\library\ThinkPHP\Lib\Think\Core\Log.class.php
[11] => C:\wwwroot\www.citycy.com\include\library\ThinkPHP\Lib\Think\Core\App.class.php
[12] => C:\wwwroot\www.citycy.com\include\library\ThinkPHP\Lib\Think\Core\Action.class.php
[13] => C:\wwwroot\www.citycy.com\include\library\ThinkPHP\Lib\Think\Core\View.class.php
[14] => C:\wwwroot\www.citycy.com\front\Common\alias.php
[15] => C:\wwwroot\www.citycy.com\include\library\ThinkPHP\Common\convention.php
[16] => C:\wwwroot\www.citycy.com\front\Conf\config.php
[17] => C:\wwwroot\www.citycy.com\data\config.inc.php
[18] => C:\wwwroot\www.citycy.com\data\config.cache.php
[19] => C:\wwwroot\www.citycy.com\front\Common\common.php
[20] => C:\wwwroot\www.citycy.com\front\Conf\routes.php
[21] => C:\wwwroot\www.citycy.com\front\Conf\tags.php
[22] => C:\wwwroot\www.citycy.com\include\library\ThinkPHP\Common\debug.php
[23] => C:\wwwroot\www.citycy.com\include\library\ThinkPHP\Lib\Think\Core\Model.class.php
[24] => C:\wwwroot\www.citycy.com\include\library\ThinkPHP\Lib\Think\Db\Db.class.php
[25] => C:\wwwroot\www.citycy.com\include\library\ThinkPHP\Lib\Think\Db\Driver\DbMysql.class.php
[26] => C:\wwwroot\www.citycy.com\data\cache\category_11.php
[27] => C:\wwwroot\www.citycy.com\include\library\ThinkPHP\Lang\zh-cn.php
[28] => C:\wwwroot\www.citycy.com\front\Lib\Action\FcontentAction.class.php
[29] => C:\wwwroot\www.citycy.com\front\Lib\Action\FbaseAction.class.php
[30] => C:\wwwroot\www.citycy.com\include\library\ThinkPHP\Lib\ORG\Util\Input.class.php
[31] => C:\wwwroot\www.citycy.com\include\Auth.class.php
[32] => C:\wwwroot\www.citycy.com\include\Act.class.php
[33] => C:\wwwroot\www.citycy.com\data\cache\front_act_cache.php
[34] => C:\wwwroot\www.citycy.com\front\Lib\Model\ContentextModel.class.php
[35] => C:\wwwroot\www.citycy.com\admin\Lib\Model\ContentModel.class.php
[36] => C:\wwwroot\www.citycy.com\include\Pager.class.php
[37] => C:\wwwroot\www.citycy.com\data\cache\model_1.php
[38] => C:\wwwroot\www.citycy.com\data\cache\modelField_1.php
[39] => C:\wwwroot\www.citycy.com\data\cache\modelField_2.php
[40] => C:\wwwroot\www.citycy.com\data\cache\modelField_4.php
[41] => C:\wwwroot\www.citycy.com\data\cache\modelField_6.php
[42] => C:\wwwroot\www.citycy.com\data\cache\modelField_7.php
[43] => C:\wwwroot\www.citycy.com\data\cache\modelField_8.php
[44] => C:\wwwroot\www.citycy.com\data\cache\modelField_9.php
[45] => C:\wwwroot\www.citycy.com\data\cache\modelField_10.php
[46] => C:\wwwroot\www.citycy.com\data\cache\modelField_11.php
[47] => C:\wwwroot\www.citycy.com\data\cache\modelField_12.php
[48] => C:\wwwroot\www.citycy.com\data\cache\modelField_13.php
[49] => C:\wwwroot\www.citycy.com\data\cache\modelField_14.php
[50] => C:\wwwroot\www.citycy.com\data\cache\modelField_15.php
[51] => C:\wwwroot\www.citycy.com\data\cache\modelField_16.php
[52] => C:\wwwroot\www.citycy.com\data\cache\modelField_20.php
[53] => C:\wwwroot\www.citycy.com\data\cache\modelField_21.php
[54] => C:\wwwroot\www.citycy.com\include\Field.class.php
[55] => C:\wwwroot\www.citycy.com\include\field\CatidField.class.php
[56] => C:\wwwroot\www.citycy.com\include\field\TitleField.class.php
[57] => C:\wwwroot\www.citycy.com\include\field\InputField.class.php
[58] => C:\wwwroot\www.citycy.com\include\field\ThumbField.class.php
[59] => C:\wwwroot\www.citycy.com\include\field\AttrField.class.php
[60] => C:\wwwroot\www.citycy.com\include\field\TextareaField.class.php
[61] => C:\wwwroot\www.citycy.com\include\field\EditorField.class.php
[62] => C:\wwwroot\www.citycy.com\include\Keylink.function.php
[63] => C:\wwwroot\www.citycy.com\include\field\BoxField.class.php
[64] => C:\wwwroot\www.citycy.com\include\field\TagField.class.php
[65] => C:\wwwroot\www.citycy.com\include\field\DatetimeField.class.php
[66] => C:\wwwroot\www.citycy.com\include\library\ThinkPHP\Lib\Think\Util\Template\TemplateSmarty.class.php
[67] => C:\wwwroot\www.citycy.com\include\Smarty\Smarty.class.php
[68] => C:\wwwroot\www.citycy.com\data\front\runtime\templates_c\%%F8^F84^F844ADE2%%article_view.html.php
[69] => C:\wwwroot\www.citycy.com\data\front\runtime\templates_c\%%71^714^714F4B17%%header.html.php
[70] => C:\wwwroot\www.citycy.com\include\Smarty\internals\core.load_plugins.php
[71] => C:\wwwroot\www.citycy.com\include\Smarty\internals\core.assemble_plugin_filepath.php
[72] => C:\wwwroot\www.citycy.com\include\tag\function.ffad.php
[73] => C:\wwwroot\www.citycy.com\data\ads\ad_1.php
[74] => C:\wwwroot\www.citycy.com\include\Ad.class.php
[75] => C:\wwwroot\www.citycy.com\data\front\runtime\templates_c\%%80^806^80621A61%%footer.html.php