1.12. SVG <text>

发布时间 : 2025-10-25 13:33:32 UTC      

Page Views: 9 views

1.12.1. SVG text-

element is used to define text.

1.12.2. Example 1

Write a text:

Here is the SVG code:

Example

<svg xmlns="http://www.w3.org/2000/svg" version="1.1"> <text x="0" y="15" fill="red">I love SVGtext> svg>    

For Opera users: view the SVG file (right-click the SVG drawing preview source).

1.12.3. Example 2

Rotated text:

Here is the SVG code:

Example

<svg xmlns="http://www.w3.org/2000/svg" version="1.1"> <text x="0" y="15" fill="red" transform="rotate(30 20,40)">I love SVGtext> svg>      

1.12.4. Example 3

Text on the path:

Here is the SVG code:

Example

<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <path id="path1" d="M75,20 a1,1 0 0,0 100,0" /> defs> <text x="10" y="100" style="fill:red;"> <textPath xlink:href="#path1">I love SVG I love SVGtextPath> text> svg>      

1.12.5. Example 4

Elements can be arranged in any sub-group and the number of elements. Every one of them. elements can contain different formats and locations. Several lines of text and ( element):

Here is the SVG code:

Example

<svg xmlns="http://www.w3.org/2000/svg" version="1.1"> <text x="10" y="20" style="fill:red;">Several lines: <tspan x="10" y="45">First linetspan> <tspan x="10" y="70">Second linetspan> text> svg>      

1.12.6. Example 5

As link text ( element):

Here is the SVG code:

Example

<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink"> <a xlink:href="http://www.w3schools.com/svg/" target="_blank"> <text x="0" y="15" fill="red">I love SVGtext> a> svg>       
                
                
            
        
        
《地理信息系统原理、技术与方法》  97

最近几年来,地理信息系统无论是在理论上还是应用上都处在一个飞速发展的阶段。 GIS被应用于多个领域的建模和决策支持,如城市管理、区划、环境整治等等,地理信息成为信息时代重要的组成部分之一; “数字地球”概念的提出,更进一步推动了作为其技术支撑的GIS的发展。 与此同时,一些学者致力于相关的理论研究,如空间感知、空间数据误差、空间关系的形式化等等。 这恰好说明了地理信息系统作为应用技术和学科的两个方面,并且这两个方面构成了相互促进的发展过程。