<!-- 要实现此效果需要 1 个步骤: -->
<!-- 第 1 步: -->
<!-- 把下面的代码加到<BODY></BODY>区域中: -->
<center><font color=red face="隶书" size=6>VML赏析六</font></center>
<BR>
<STYLE>
v\:* { BEHAVIOR: url(#default#VML) }
</STYLE>
<!--
<v:polyline style="position:relative" Points="0,0 100,100 400,100 400,300">
<v:stroke dashstyle="Dot" EndArrow="Classic"/>
</v:polyline>
//-->
<script>
function downShap()
{
var obj = event.srcElement;
obj.Shadow.on = "false";
obj.upx = obj.style.pixelLeft;
obj.upy = obj.style.pixelTop;
with(obj.style)
{
pixelLeft += 10;
pixelTop += 10;
}
}
function upShap()
{
var obj = event.srcElement;
obj.Shadow.on = "true";
with(obj.style)
{
pixelLeft = obj.upx;
pixelTop = obj.upy;
}
}
function downball()
{
var judger = ball.style.pixelTop + 4;
if(judger<=200)
{
ball.style.pixelTop = judger;
}
else
{
var ifup = ball.style.pixelHeight - 4;
if(ifup>=80)
{
ball.style.pixelHeight = ifup;
ball.style.pixelTop += 2;
ball.style.pixelWidth += 2;
}
else
{
setTimeout("upball()",10);
return;
}
}
setTimeout("downball()",10);
}
function upball()
{
var judger = ball.style.pixelHeight + 4;
if(judger<=100)
{
ball.style.pixelHeight = judger;
ball.style.pixelTop -= 2;
ball.style.pixelWidth -= 2;
}
else
{
var ifdown = ball.style.pixelTop - 4;
if(ifdown>= 80)
{
ball.style.pixelTop = ifdown;
}
else
{
ball.style.pixelTop = 80;
setTimeout("downball()",10);
return;
}
}
setTimeout("upball()",10);
}
function window.onerror()
{
return true;
}
</script>
<v:RoundRect style="position:absolute; left:100; top:100; width: 100; height:60; cursor: hand" onmouseover="downShap()" onmouseout="upShap()">
<v:Shadow on="true" / type = "single" color="#b3b3b3" offset="10px,10px"/>
<v:TextBox inset="5px,5px,5px,5px" style="font-size:10pt; color:#000000; font-family: Arial Black">Button</v:TextBox>
</v:RoundRect>
<v:Oval id="ball" style="position:absolute; left: 300; top:80; width:100; height:100;">
<v:TextBox inset="5px,5px,5px,5px" style="font-size:25pt; color:#000000; font-family: Arial Black">^_^</TextBox>
</v:Oval>
<script>
upball()
</script>