svg中如何插入中文文本 500分
请问svg中如何插入中文文本?
请尽快告知
500分分批答谢
问题点数:100、回复次数:5Top
1 楼saucer(思归)回复于 2003-01-04 23:59:00 得分 0
after you enter 中文文本 in the svg file, try to save the file in UTF-8 formatTop
2 楼binxiao(lang)回复于 2003-01-05 08:57:35 得分 0
http://www-900.ibm.com/developerWorks/cn/
你到這個網站去 search svg
有關與svg教程資料介紹
Top
3 楼net_lover(【孟子E章】)回复于 2003-01-05 11:20:43 得分 100
注意把文件格式保存为unicode或者utf-16。另外需要adobe svg viewer3.0中文版插件
<?xml version="1.0" encoding="UTF-16" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg width="500" height="400"
xmlns="http://www.w3.org/2000/svg">
<desc>本例子说明SVG的动画元素</desc>
<defs>
<!-- 下面定义渐变效果 -->
<linearGradient id="grad1" x1="0" y1="0" x2="0" y2="100%" gradientUnits="userSpace">
<stop offset="0%" style="stop-color: #88f;"/>
<stop offset="100%" style="stop-color: #008;"/>
</linearGradient>
</defs>
<!-- 下面代码说明了如何使用animate元素来使圆产生动画效果,同时改变圆心的位置和半径的大小 -->
<circle id="RectElement" cx="50" cy="50" r="50"
fill="rgb(255,0,0)" style="fill: url(#grad1);">
<animate attributeName="cx" attributeType="XML"
xlink:href="#RectElement" begin="0s" dur="9s" fill="freeze" from="50" to="250" />
<animate attributeName="cy" attributeType="XML"
xlink:href="#RectElement" begin="0s" dur="9s" fill="freeze" from="150" to="152" />
<animate attributeName="r" attributeType="XML"
xlink:href="#RectElement" begin="0s" dur="9s" fill="freeze" from="50" to="150" />
</circle>
<!-- 建立一个新的坐标系统,并使文字旋转和放大 -->
<g transform="translate(50,50)" >
<!-- 下面的代码定义了“Hello,World!”这段文字,说明了'set','animateMotion',
'animateColor'和'animateTransform'元素的用法。 -->
<text id="TextElement" x="0" y="0"
font-family="宋体-18030" font-size="18" visibility="hidden" >
欢迎光临
<set attributeName="visibility" attributeType="CSS" to="visible"
begin="4s" dur="6s" fill="freeze" />
<animateMotion path="M 0 20 L 50 120"
begin="4s" dur="6s" fill="freeze" />
<animateColor attributeName="fill" attributeType="CSS"
from="rgb(0,0,255)" to="rgb(128,0,0)"
begin="4s" dur="6s" fill="freeze" />
<animateTransform attributeName="transform" attributeType="XML"
type="rotate" from="-90" to="0"
begin="4s" dur="6s" fill="freeze" />
<animateTransform attributeName="transform" attributeType="XML"
type="scale" from="1" to="3" additive="sum"
begin="4s" dur="6s" fill="freeze" />
</text>
<text x="145" y="285">http://lucky.myrice.com</text>
</g>
</svg>Top
4 楼net_lover(【孟子E章】)回复于 2003-01-05 11:22:16 得分 0
直接观看例子
http://freedownload.myrice.com/lu/lucky/a.svgTop
5 楼ji_gr(雪域孤猿)回复于 2003-01-06 18:47:25 得分 0
net_lover(孟子E章),我给了你一百分,则么没有显示,另外400怎么给?Top




