【发布时间】:2021-08-23 23:01:15
【问题描述】:
我正在制作一个 SVG 动画横幅,在横幅中我有一个打字文本动画,一切顺利,但我有一个特定的横幅宽度,所以我需要在第二行和第三行保持打字效果。如何在第二行和第三行获得换行符保持打字效果?不使用 JAVASCRIPT 和 CSS
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="600"
height="700"
version="1.1"
viewBox="0 0 600 700"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
>
<path id="path">
<animate attributeName="d" from="m0,110 h0" to="m0,110 h1100" dur="2.8s" begin="0s" repeatCount="indefinite"/>
</path>
<text
id="texto"
transform="scale(.71121 1.406)"
x="48.809311"
y="216.08093"
fill="#000000"
font-family="sans-serif"
font-size="17.42px"
image-rendering="auto"
stroke-width="2.4355"
style="line-height:1.25"
xml:space="preserve"
>
<textPath xlink:href="#path">
<tspan x="48.809311"
y="216.08093"
stroke-width="2.4355">Este es el texto que estamos probando</tspan>
</textPath>
</text>
</svg>
【问题讨论】: