以文本方式查看主题

-  中文XML论坛 - 专业的XML技术讨论区  (http://bbs.xml.org.cn/index.asp)
--  『 SVG/GML/VRML/X3D/XAML 』  (http://bbs.xml.org.cn/list.asp?boardid=21)
----  svg实现类似走马灯的效果  (http://bbs.xml.org.cn/dispbbs.asp?boardid=21&rootid=&id=84189)


--  作者:applegump
--  发布时间:4/7/2010 7:46:00 PM

--  svg实现类似走马灯的效果
我想做一个这样的效果,就是一条虚线做成能能原地跑动的效果,有点类似

走马灯,想了很久,一直没有思路,不知道哪位大大有想法,谢谢


--  作者:admin
--  发布时间:4/7/2010 11:36:00 PM

--  
用javascript就可以阿
--  作者:applegump
--  发布时间:4/8/2010 11:12:00 AM

--  
<?xml version="1.0" encoding="iso-8859-1" ?>
<svg>

<desc>简单动画演示实例</desc>
 

 <path d="M 100,250  400,250 " fill="none" stroke="black" stroke-width="5"  />
 
 <path d="M 100,0  390,0" fill="none" stroke="red" stroke-width="5"  stroke-dasharray="5 5">
 
 <animateMotion path="M 0,250  10,250 "  begin="0s" dur="1s" fill="freeze"  repeatCount="indefinite"  rotate="auto" />
 

 </path>
 


 <path d="M 400,250  400,50" fill="none" stroke="black" stroke-width="5" />
 
 <path d="M 400,100  400,250" fill="none" stroke="blue" stroke-width="5"  stroke-dasharray="5 5" >
 
 < animateMotion path="M 400,100  400,300"  begin="0s" dur="1s"     repeatCount="indefinite"  /> 

 </path> 

</svg>


--  作者:applegump
--  发布时间:4/8/2010 11:16:00 AM

--  
<path d="M 100,0  390,0" fill="none" stroke="red" stroke-width="5"  stroke-
                   ~~~~~~~~~~~~~~这里为什么坐标是100,0  390,0啊,什么时候用绝对坐标,什么时候用相对坐标啊

dasharray="5 5">

<animateMotion path="M 0,250  10,250 "  begin="0s" dur="1s" fill="freeze"
                                  ~~~~~~~~~~~~~~~这里的坐标为什么是0,250  10,250啊,
                                                              什么时候用绝对坐标,什么时候用相对坐标?
repeatCount="indefinite"  rotate="auto" />


还有,纵向的根本动不起来,我都不知道怎么回事,那位大大指点一下啊


W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
46.875ms