search

Home  >  Q&A  >  body text

ie-css3.htc 放在服务器上为什么不起作用

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

<!DOCTYPE html>
<html lang="en">
<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>
   <p class="cricle"></p>
</body>
</html>
PHPzPHPz2779 days ago819

reply all(5)I'll reply

  • 高洛峰

    高洛峰2017-04-17 11:53:33

    Personal testing is OK. Just put it in the root directory and take a look

    reply
    0
  • ringa_lee

    ringa_lee2017-04-17 11:53:33

    How did you do it? Why can’t mine?

    reply
    0
  • 阿神

    阿神2017-04-17 11:53:33

    css3 is supported by ie9 and above

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-17 11:53:33

    Haha, I guessed it, cross-domain is not supported.

    If

    is placed in the root directory of the website and accessed as http://127.0.0.1/index.html, the CSS file cannot write behavior: url(http://localhost/ie-css3.htc); instead write behavior: url(http://127.0.0.1/ie-css3.htc);. However, it is best to use relative paths if the css file is in the same directory as ie-css3.htc. In the same folder, write behavior: url(ie-css3.htc);

    Test environment: windows7 + IE8


    Also:

    • The current element must have positioning attributes, such as position:relative or position:absolute attributes.

    • z-indexThe value must be higher than the surrounding elements

    • border-radiusSetting only one corner is invalid

    • The color in
    • box-shadow can only be set to #000

    • text-shadowThe performance under IE is slightly different from Firefox/Safari/Chrome, the reason is unknown
      Reference: Let IE6/IE7/IE8 browser support CSS3 attributes

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 11:53:33

    Try changing the path of the url, using a relative path is better

    reply
    0
  • Cancelreply