javascript当然没问题,不过这种程序最适合用flash制作,而且网站好象有现成的代码.

解决方案 »

  1.   

    这个可以做到,单纯用javascript就可以
      

  2.   

    谢谢各位,能告诉我用javascript做的话,三角形块用什么实现么?
      

  3.   

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html xmlns:v="urn:schemas-microsoft-com:vml">
    <head>
    <title>Thinking in VML</title>
    </head>
    <STYLE>
     v\:* { BEHAVIOR: url(#default#VML) }
    </STYLE>
    <LINK REL="stylesheet" TYPE="text/css" HREF="style.css" />
    <body>
    <table align="center">
    <tr>
    <td align="center" class="title"><strong>ShapeType给VML制作模版</strong></td>
    </tr>
    <tr>
    <td >
    <div class="memo" style="width:700;line-height:23px">
    &nbsp;&nbsp;&nbsp;&nbsp;VML的这个功能很有用,模版,顾名思义,它可以减少书写代码的量,又使的代码可读性提高。在理解VML模版的时候,可以
    和 HTML 的 CSS 一样理解,它是定义好的一种形状,下次使用的时候直接声明 type 属性就可以了。看看下面的例子:<br><br>
    &lt;v:<font color=red>shapetype id="arrowUP" </font>coordsize="6 6"&gt;    &lt;!--三角形 向上--&gt;<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&lt;v:path v="m 3,0 l 0,6,6,6,3,0 x e" /&gt;<br>
    &lt;/v:shapetype&gt;<br>
    &lt;v:<font color=red>shapetype id="arrowDown" </font>coordsize="6 6"&gt;  &lt;!--三角形 向下--&gt;<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&lt;v:path v="m 0,0 l 3,6,6,0,0,0 x e" /&gt;<br>
    &lt;/v:shapetype&gt;<br><br>
    <v:shapetype id="arrowUP" coordsize="6 6">
    <v:path v="m 3,0 l 0,6,6,6,3,0 x e" />    
    </v:shapetype>
    <v:shapetype id="arrowDown" coordsize="6 6">
    <v:path v="m 0,0 l 3,6,6,0,0,0 x e" />
    </v:shapetype>
    &nbsp;&nbsp;&nbsp;&nbsp;定义好上面的模版后,以后就可以直接调用了:<br><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<v:shape type="#arrowUP" style="position:relative;width:50;height:50"/>&lt;v:shape type="<font color=red>#arrowUP</font>" style="position:relative;width:50;height:50"/&gt;<br><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<v:shape type="#arrowDown" style="position:relative;width:50;height:50"/>&lt;v:shape type="<font color=red>#arrowDown</font>" style="position:relative;width:50;height:50"/&gt;<br><br>
    &nbsp;&nbsp;&nbsp;&nbsp;<v:shape type="#arrowDown" fillcolor=blue style="position:relative;width:80;height:80"/>&lt;v:shape fillcolor=blue type="<font color=red>#arrowDown</font>" style="position:relative;width:80;height:80" /&gt;<br><br>
    &nbsp;&nbsp;&nbsp;&nbsp;不知道大家有没有注意到,VML里面对“,”使用不强制的,你可以使用 coordsize="6,6" 也可以使用 coordsize="6 6" ,效果是一样的。
    </div>
    </td>
    </tr>
    <tr>
    <td class="title">
    <p align="right"><a href="javascript:self.scrollTo(0,0)">Top</a></p>
    <a href="index.html">返回目录</a><br>
    上一节:<a href="step7.html">Group容器</a><br>
    下一节:<a href="step21.html">脚本动态生成VML</a>
    </td>
    </tr>
    </table>
    </body>
    </html>