vml

来源:互联网 发布:我的世界pe怎么做js 编辑:程序博客网 时间:2024/04/30 11:10
VML 图形不经任何处理只有在 ie5 版本下才能生效。

js动态添加图形无需 style 命名空间。但是静态的图形 就必须要添加 style.

<STYLE>
    v\:* Behaviorurl(#default#VML) }    /*  命名空间“v” */
</STYLE>


  1. js例子
<script type="text/javascript">
   <!-- 添加背景蓝色 方框 -->
   document.write('<v:shape id="RECT" CoordOrig="10,0" CoordSize="100,100" style="width:100px;height:100px; background:#06C" />');
    document.getElementById("RECT").onclick=function(){alert(this.id)}
</script>


  1. 静态例子







0 0
原创粉丝点击