IT/- 프로그래밍
HTML5/CSS3 svg 의 path 따라서 텍스트 나타내기
혁준7519
2017. 7. 25. 06:16
svg 의 path 따라서 텍스트 나타내기
html)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, height=device-height, minimum-scale=1.0, maximum-scale=1.0, initial-scale=1.0"> <title>Insert title here</title> </head> <body> <?xml version="1.0" ?> <svg xmlns="http://www.w3.org/2000/svg" width="300px" height="400px" version="1.1"> <!-- path 를 미리 정의합니다. --> <defs> <path id="path" d="M50,100 C100,0 150,200 200,100" /> </defs> <!-- textPath : 텍스트가 그려질 path 를 지정합니다. --> <text font-size="15px" font-weight="bold" style="fill:green;"> <textPath xlink:href="#path">선따라 텍스트를 그립니다...</textPath> </text> </svg> </body> </html> | cs |
결과