您的位置:首页 > 技术中心 > 前端框架 >

ie css3.htc不起作用怎么办

时间:2021-01-04 10:47

ie css3.htc不起作用是因为不支持跨域,其解决办法:首先将ie-css3.htc放在网站根目录下;然后修改语句为“behavior: url(http://127.0.0.1/ie-css3.htc);”即可。

测试环境:windows7 + IE8 +Dell G3

推荐:《css视频教程》

ie css3.htc不起作用怎么办?

ie css3.htc不起作用是因为不支持跨域。

问题:

ie-css3.htc放在服务器上,也可以正常访问,为什么在IE8上看不到效果呢,百思不得其解?

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
          .cricle{width:100px;height:100px;background: red;border-radius: 50%;position: relative;behavior: url(http://kom3.eisoo.com/css/ie-css3.htc); } 
    </style> 
</head>
<body>
   <div></div>
</body>
</html>

解决办法:

如果放在网站根目录下,以http://127.0.0.1/index.html访问时,CSS文件中就不可以写behavior: url(http://localhost/ie-css3.htc);而是写behavior: url(http://127.0.0.1/ie-css3.htc);但是最好使用相对路径如果css文件与ie-css3.htc在同一文件夹下,写behavior: url(ie-css3.htc);

以上就是ie css3.htc不起作用怎么办的详细内容,更多请关注www.gxlsystem.com其它相关文章!

本类排行

今日推荐

热门手游