来源:自学PHP网 时间:2018-02-09 10:05 作者: 阅读:次
[导读] 本系列文章导航VML极道教程(一) VML介绍 VML极道教程(二) VML入门VML极道教程(三) 标记实战与line线VML极道教程(四) oval圆rect矩型VML极道教程(五) RoundRect圆矩型VML极道教程(六) image图片VML极道...
shape多边型.shapetype模版.shape与curve曲线
1:shape多边型 - 专用属性
<HTML xmlns:v><STYLE>v/:*{behavior:url(#default#VML);}</STYLE><BODY bgcolor="#eeeeee">
<v:shape style="Z-INDEX:1;LEFT:71;WIDTH:100;POSITION:absolute;TOP:225;HEIGHT:100" coordsize="100,100" filled="t" fillcolor="white" path="m0,0 l30,-30 e"/> <v:shape style="Z-INDEX:1;LEFT:171;WIDTH:100;POSITION:absolute;TOP:225;HEIGHT:100" coordsize="100,100" filled="t" fillcolor="white" path="m0,0 l30,-30,60,0 e"/> <v:shape style="Z-INDEX:1;LEFT:271;WIDTH:100;POSITION:absolute;TOP:225;HEIGHT:100" coordsize="100,100" filled="t" fillcolor="white" path="m0,0 l30,-30,60,0,0,0 e"/> <v:shape style="Z-INDEX:1;LEFT:371;WIDTH:100;POSITION:absolute;TOP:225;HEIGHT:100" coordsize="100,100" filled="f" strokecolor="blue" path="m0,0 l30,30,60,0,0,0 e"/> <v:shape style="Z-INDEX:1;LEFT:471;WIDTH:50;POSITION:absolute;TOP:225;HEIGHT:100" coordsize="100,100" filled="f" strokecolor="blue" path="m0,0 l30,30,60,0,0,0 e"/> <v:shape style="Z-INDEX:1;LEFT:571;WIDTH:2000;POSITION:absolute;TOP:225;HEIGHT:2000" coordsize="1000,1000" filled="t" strokecolor="blue" path="m0,0 l30,30,60,0,0,0 e"/> <v:shape style="Z-INDEX:1;LEFT:571;WIDTH:5000;POSITION:absolute;TOP:300;HEIGHT:5000" coordsize="1000,1000" filled="t" strokecolor="blue" path="m0,0 l30,30,60,0,0,0 e"/>
<HTML xmlns:v><STYLE>v/:*{behavior:url(#default#VML);}</STYLE><BODY bgcolor="#eeeeee">
<v:shape style="Z-INDEX:1;LEFT:71;WIDTH:100;POSITION:absolute;TOP:225;HEIGHT:100" coordsize="100,100" filled="t" fillcolor="white" path="m0,0 l30,-30 e"/> <v:shape style="Z-INDEX:1;LEFT:171;WIDTH:100;POSITION:absolute;TOP:225;HEIGHT:100" coordsize="100,100" filled="t" fillcolor="white" path="m0,0 l30,-30,60,0 e"/> <v:shape style="Z-INDEX:1;LEFT:271;WIDTH:100;POSITION:absolute;TOP:225;HEIGHT:100" coordsize="100,100" filled="t" fillcolor="white" path="m0,0 l30,-30,60,0,0,0 e"/> <v:shape style="Z-INDEX:1;LEFT:371;WIDTH:100;POSITION:absolute;TOP:225;HEIGHT:100" coordsize="100,100" filled="f" strokecolor="blue" path="m0,0 l30,30,60,0,0,0 e"/> 其实shape多边形的path路径参数原理跟polyline的points路径参数大同小异,下面就详细解释path的参数 <HTML xmlns:v><STYLE>v/:*{behavior:url(#default#VML);}</STYLE><BODY>
<v:shape style="Z-INDEX:3180;LEFT:300px;WIDTH:100px;POSITION:absolute;TOP:179px;HEIGHT:100px" coordsize="100,100" filled="f" fillcolor="white" strokecolor="black" strokeweight=".75pt" path=" m0,0 l0,0,-5,16,-6,18,-7,20,-7,21,-8,21,-9,23,-10,24,-11,25,-12,26,-13,27,-15,28,-18,29,-21,31,-23,32,-25,33,-26,34,-25,31,-22,28,-19,24 -16,20,-12,15,-9,11,-6,7,-3,4,0,2,3,0,4,-2,6,-3,14,-9,15,-11,16,-12,17,-13,18,-11,18,-9,18,-5,18,-1,18,4,18,9,20,15 21,19,24,26,26,28,27,29,28,30,30,31,31,31,33,31,35,32,35,33,36,31,34,29,30,24,22,19,15,14,2,8,-2,6,-3,5,-4,5,-5,4 -5,3,-5,4,-3,6,3,10,9,14,13,18,18,23,22,27,27,31,28,33,30,34,31,33,31,31,31,27,29,23,27,19,24,16,22,14,20,11,18,9 17,9,15,10,13,12,10,15,7,18,5,21,2,24,-1,25,-2,27,-3,29 e"/> <v:shape style="Z-INDEX:3185;LEFT:360px;WIDTH:100px;POSITION:absolute;TOP:173px;HEIGHT:100px" coordsize="100,100" filled="f" fillcolor="white" strokecolor="blue" strokeweight=".75pt" path=" m0,0 l0,0,34,-8,33,-7,31,-4,29,-2,27,1,25,3,23,4,21,6,19,7,19,8,18,8,17,9,16,9,14,10,12,10,9,11,6,12,4,12,8,12 13,12,19,9,23,8,27,7,29,7,31,7,29,9,25,13,20,16,16,20,11,24,7,26,6,27,8,27,12,27,17,26,23,25,27,23,30,21,31,20 32,20,33,19,33,18,34,18,36,20,38,23,39,25,41,28,42,30,43,32 e"/> <v:shape style="Z-INDEX:3186;LEFT:452px;WIDTH:100px;POSITION:absolute;TOP:160px;HEIGHT:100px" coordsize="100,100" filled="f" fillcolor="white" strokecolor="red" strokeweight=".75pt" path=" m0,0 l0,0,-12,17,-13,18,-11,16,-7,14,-2,12,3,9,9,6,15,5,20,4,22,3,24,2,22,5,20,7,15,10,14,11,11,14,7,17,4,19,1,20 1,21,0,21,-2,22,-2,23,-4,24,-1,23,3,21,11,19,18,17,23,15,29,14,30,14,31,14,28,14,24,14,21,14,17,14,14,13,13,13,11,12 10,15,10,17,10,21,10,24,10,25,10,26,11,24,13,22,15,18,15,15,15,12,16,11,16,10,17,10,18,11,18,13,18,15,18,16,18,18,18,19 18,20,19,18,20,17,22,15,23,12,24,11,24,13,24,14,24,17,24,20,22,22,19,24,15,27,9,30,2,31,-3,33,-7,34,-11,36,-13,37,-10,34 -3,31,5,26,12,23,20,19,25,17,29,15,26,16,21,19,15,23,9,28,3,33,-2,36,-7,40,-8,41,-4,38,0,36,6,34,10,32,11,30,13,29 14,31,14,34,11,38,4,43,-5,49,-16,55,-28,60,-37,64,-43,65,-42,65,-39,63,-33,58,-27,56,-20,51,-12,49,-7,45,1,43,6,39,9,38,10,37 11,36,11,35,12,35,14,34,15,33,16,33,13,34,10,35,5,38,3,40,2,41,2,42,3,43,4,43,6,43,8,43,12,43,16,42,22,40,27,37 33,34,36,33,39,31,39,29,39,28,39,26,38,25,36,24,35,24,34,24,33,25,33,26,32,27,32,29,32,32,32,35,32,39,32,42,32,44,32,47 33,50,35,54,37,58,39,62,41,66,42,69 e"/> <v:shape style="Z-INDEX:3187;LEFT:327px;WIDTH:100px;POSITION:absolute;TOP:277px;HEIGHT:100px" coordsize="100,100" filled="t" fillcolor="yellow" strokecolor="black" strokeweight=".75pt" path=" m0,0 l0,0,9,0,20,-9,19,20,10,10,0,10,0,0 e"/>
<HTML xmlns:v><STYLE>v/:*{behavior:url(#default#VML);}</STYLE><BODY>
<v:ShapeType id="m1" coordsize="1000 1000" fillcolor="yellow"> <v:Path v="m0,0 l30,-30,60,0,0,0 e"/> </v:ShapeType> <v:Shape style="Z-INDEX:1;LEFT:271;WIDTH:1000;POSITION:absolute;TOP:225;HEIGHT:1000" type="#m1"/> <v:Shape style="Z-INDEX:1;LEFT:371;WIDTH:2600;POSITION:absolute;TOP:225;HEIGHT:4600" type="#m1"/> <v:Shape style="Z-INDEX:1;LEFT:271;WIDTH:1000;POSITION:absolute;TOP:300;HEIGHT:1000" type="#m1" fillcolor="red"/> 综合上一章节所学的shape多边形知识,相信在看这个例子不难分析出,shapetype是专门用来定义形状摸版的(不可见),而后在由shape标记引用、将模版实例化的按照path子属性值输出多边形(可见)。
<HTML xmlns:v><STYLE>v/:*{behavior:url(#default#VML);}</STYLE><BODY>
<v:shape style="Z-INDEX:1;LEFT:100;WIDTH:100;POSITION:absolute;TOP:225;HEIGHT:100" coordsize="100,100" filled="t" fillcolor="white" path="m0,0 c130,-90,30,90,150,180 e"/> <v:shape style="Z-INDEX:1;LEFT:271;WIDTH:100;POSITION:absolute;TOP:225;HEIGHT:100" coordsize="100,100" filled="t" fillcolor="white" path="m0,0 c130,-90,30,90,160,0 e"/> <v:shape style="Z-INDEX:1;LEFT:500;WIDTH:100;POSITION:absolute;TOP:225;HEIGHT:100" coordsize="100,100" filled="t" fillcolor="white" path="m0,0 c130,-90,30,90,160,0,-80,50,30,190,220,-50 x e"/> <v:shape style="Z-INDEX:1;LEFT:350;WIDTH:100;POSITION:absolute;TOP:400;HEIGHT:100" coordsize="100,100" filled="t" fillcolor="white" path="m0,0 l50,-60,100,0,50,60,0,0 c-130,-90,-30,90,130,180 e"/>
<HTML xmlns:v><STYLE>v/:*{behavior:url(#default#VML);}</STYLE><BODY>
<v:curve style="Z-INDEX:1;LEFT:300;POSITION:absolute;TOP:200" from="0,0" to="150px,0px" strokecolor="green"/> 这看起来跟line的写法差不多,而且输出效果也基本一致(from="0,0"可以省略,因为默认就是0,0,我们调整它的意义不大)。不同的就在于control1和control2这两个线条曲度调整属性,请看下面的例子 <HTML xmlns:v><STYLE>v/:*{behavior:url(#default#VML);}</STYLE><BODY>
<v:curve style="Z-INDEX:1;LEFT:100;POSITION:absolute;TOP:100" to="150px,0px" strokecolor="green" control1="100,50"/> <v:curve style="Z-INDEX:1;LEFT:100;POSITION:absolute;TOP:200" to="150px,0px" strokecolor="green" control1="150px,50px"/> <v:curve style="Z-INDEX:1;LEFT:100;POSITION:absolute;TOP:300" to="150px,0px" strokecolor="green" control1="0,50"/> <v:curve style="Z-INDEX:1;LEFT:100;POSITION:absolute;TOP:400" to="150px,0px" strokecolor="green" control1="-50,50"/> 请仔细仔细的分析上边的代码,这是单曲度的例子,不难看出control1="100,50"其中的100即表示第一个曲度的X差值为100px、y即表示第一个曲度的Y差值为50px <HTML xmlns:v><STYLE>v/:*{behavior:url(#default#VML);}</STYLE><BODY>
<v:curve style="Z-INDEX:1;LEFT:100;POSITION:absolute;TOP:100" to="150px,0px" strokecolor="green" control2="100,50"/> <v:curve style="Z-INDEX:1;LEFT:100;POSITION:absolute;TOP:200" to="150px,0px" strokecolor="green" control2="150px,50px"/> <v:curve style="Z-INDEX:1;LEFT:100;POSITION:absolute;TOP:300" to="150px,0px" strokecolor="green" control2="0,50"/> <v:curve style="Z-INDEX:1;LEFT:100;POSITION:absolute;TOP:400" to="150px,0px" strokecolor="green" control2="-50,50"/> 请仔细仔细的分析上边的代码,这是单曲度的例子,不难看出control2="100,50"其中的100即表示第二个曲度的X差值为100px、y即表示第二个曲度的Y差值为50px <HTML xmlns:v><STYLE>v/:*{behavior:url(#default#VML);}</STYLE><BODY bgcolor="#eeeeee">
<v:curve style="Z-INDEX:1;LEFT:100;POSITION:absolute;TOP:100" to="150px,0px" fillcolor="yellow" control1="75,50" control2="75,-50"/> <v:curve style="Z-INDEX:1;LEFT:350;POSITION:absolute;TOP:100" to="0,150px" control1="50,75" control2="-50,75"/> <v:curve style="Z-INDEX:1;LEFT:100;POSITION:absolute;TOP:300" to="150px,0px" filled='f' control1="75,150" control2="75,-150"/> <v:curve style="Z-INDEX:1;LEFT:300;POSITION:absolute;TOP:300" to="150px,0px" fillcolor="green" control1="110,150" control2="110,-150"/> <v:curve style="Z-INDEX:1;LEFT:100;POSITION:absolute;TOP:500" to="150px,0px" strokeweight=2 control1="300,150" control2="300,0"/> <v:curve style="Z-INDEX:1;LEFT:500;POSITION:absolute;TOP:500" to="150px,0px" fillcolor="blue" stroked=f control1="-110,-150" control2="-110,-150"/> 在请仔细揣摩上边的双曲度例子,这个很难说清楚,如果你不懂曲线学的话,我想我越说只会使你越糊涂……。 |
自学PHP网专注网站建设学习,PHP程序学习,平面设计学习,以及操作系统学习
京ICP备14009008号-1@版权所有www.zixuephp.com
网站声明:本站所有视频,教程都由网友上传,站长收集和分享给大家学习使用,如由牵扯版权问题请联系站长邮箱904561283@qq.com