• htc支持CSS3


    <!DOCTYPE html>
    <html lang="zh">
    <head>
        <meta charset="UTF-8">
        <title>html5标签</title>
    
        <style>
    
    .round{
        width: 100px;
        height: 100px;
        background: red;
        border-radius: 50px;
        box-shadow: 0px 0px 20px #000;
    }
    
        </style>
    
    </head>
    <body>
    <div class="round">
    
    </div>
    </body>
    </html>

    css3的border-radius在IE下没有效果,解决方法:

    首先下载ie-css3.htc脚本,然后在css中加入:

    behavior: url(ie-css3.htc);

    当你使用了这个htc文件后,你的CSS里面,只要写有box-shadow, -moz-box-shadow或-webkit-box-shadow的任何一种,IE就会渲染。

    当使用了这个htc文件后,你不能这样写box-shadow: 0 0 10px red; 而应该是box-shadow: 0px 0px 10px red; 否则IE中会失效。

    不支持RGBA值中的alpha透明度。
    不支持inset内阴影。
    不支持阴影扩展。
    阴影在IE中只会显示为黑色,不管你设置成其它什么颜色。

    <!DOCTYPE html>
    <html lang="zh">
    <head>
        <meta charset="UTF-8">
        <title>html5标签</title>
    
        <style>
        *{
             behavior: url(ie-css3.htc); 
        }
    .round{
        width: 100px;
        height: 100px;
        background: red;
        border-radius: 50px;
        box-shadow: 0px 0px 20px #000;
    }
    
        </style>
    
    </head>
    <body>
    <div class="round">
    
    </div>
    </body>
    </html>

  • 相关阅读:
    canvas
    canvas -矩形
    canvas
    requestAnimationFrame
    flex in css
    让 .vue 支持 atom
    前端应该知道的基础知识汇总
    css伪类总结
    制作滑动门菜单
    页面布局中遇到菱形图片时的处理办法
  • 原文地址:https://www.cnblogs.com/tinyphp/p/4782543.html
Copyright © 2020-2023  润新知