日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

VML实例-可控箭头

發布時間:2023/12/16 编程问答 42 豆豆
生活随笔 收集整理的這篇文章主要介紹了 VML实例-可控箭头 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

VML可控箭頭

<html xmlns="http://www.w3.org/1999/xhtml"xmlns:v="urn:schemas-microsoft-com:vml"xmlns:o="urn:schemas-microsoft-com:office:office" lang="en"> <head> <title>畫斜線</title> <!--[if !mso]> <style> v\:*{behavior:url(#default#VML)} </style> <![endif]--> <style type="text/css"> body{padding:0px;margin:0px;} #line{position:absolute;left:0;top:0;z-Index:3;} </style> </head> <body><v:line id="line"></v:line> <v:PolyLine id="pLine" filled="false" Points="0,0 0,100"></v:PolyLine> <v:shape CoordOrig="100,100" CoordSize="200,200"></v:shape><script language="javascript"> var line=document.getElementById("line");line.to="0,0"; line.from="0,0"; with(line.stroke) {Color="#FF0000";Weight="1px";EndArrow="Classic";DashStyle="LongDashDot"; }line=document.getElementById("pLine"); line.style.position="absolute"; with(line.stroke) {Color="#000";Weight="1px";EndArrow="Classic";DashStyle="Solid"; } line.Points.value="10,10 100,100 200,300 400,500"; var html="10,10"; var direction=0; var prePoint=[10,10]; var step=5; function Move() {var x=step*Math.cos(direction);var y=step*Math.sin(direction);var p=prePoint;p[0]+=x;p[1]-=y;p[0]=Math.round(p[0]);p[1]=Math.round(p[1]);if(p[0]>=0&&p[1]>=0&&step>0){prePoint=p;html+=" "+prePoint[0]+","+prePoint[1];line.Points.value=html;} } window.setInterval(Move,50);function document_KeyDown(e) {var e=window.event;if(e.keyCode==37)direction+=0.1;else if(e.keyCode==39)direction-=0.1;else if(e.keyCode==38)step=Math.min(Math.max(step+1,1),15);else if(e.keyCode==40)step=Math.max(step-1,0); } document.onkeydown=document_KeyDown; document.body.focus(); </script> </body> </html>

Tip:

方向鍵左右控制方向,上下控制快慢

總結

以上是生活随笔為你收集整理的VML实例-可控箭头的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。