锚点功能在网站制作过程中是经常会用到的,而且是一个非常好用的功能。
       今天遇到这样一个问题刚刚做好的静态页面使用到了锚点,用IE8打开却失效了。尝试用火狐,360浏览器打开却没问题。很明显这是浏览器的兼容性问题。
       解决办法在html页面中head标记内加入<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
       <head>
       <title></title>
       <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
       <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
       <link href="style.css" rel="stylesheet" type="text/css" />
       </head>

       注意:<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />必须跟在meta标记后,否则还是无效的。
 

posted on 2010-07-26 17:00  AlexCheng  阅读(422)  评论(0编辑  收藏  举报