SVG
스케일러블 벡터 그래픽스(Scalable Vector Graphics, SVG)는 2차원 벡터 그래픽을 표현하기 위한 XML 기반의 파일 형식으로, 1999년 W3C(World Wide Web Consortium)의 주도하에 개발된 오픈 표준의 벡터 그래픽 파일 형식이다. SVG 형식의 이미지와 그 작동은 XML 텍스트 파일들로 정의 되어 검색화·목록화·스크립트화가 가능하며 필요하다면 압축도 가능하다.
- 인터넷 익스플로러9 버전 이상부터 지원됩니다.
- XML을 이용하여 라인, 곡선, 기하학적인 그래픽 표현이 가능합니다.
- 벡터 방식이기 때문에 확대하거나 축소가 가능합니다.
- DOM 단위로 컨트롤이 가능하지만 문서 복잡도가 증가되면 렌더링이 느려집니다.
사각형(rect)
svg
<div class="svgBox svg1">
<svg>
<rect fill="#F48FB1" width="100" height="100" x="30" y="30" />
</svg>
<svg>
<rect fill="#F48FB1" width="100" height="100" x="30" y="30" stroke="#880E4F" stroke-width="5" />
</svg>
<svg>
<rect fill="#F48FB1" width="100" height="100" x="30" y="30" rx="20" ry="20" />
</svg>
<svg>
<rect fill="#F48FB1" width="100" height="100" x="30" y="30" rx="20" ry="20" stroke="#880E4F" stroke-width="5" />
</svg>
<svg>
<rect fill="#F48FB1" width="100" height="100" x="30" y="30" rx="40" ry="40" />
</svg>
<svg>
<rect fill="#F48FB1" width="100" height="100" x="30" y="30" rx="60" ry="60" stroke="#880E4F" stroke-width="5" />
</svg>
</div>
원형(circle, ellipse)
svg
<div class="svgBox svg1">
<svg>
<circle fill="#F48FB1" r="60" cx="80" cy="80" />
</svg>
<svg>
<circle fill="#F48FB1" r="60" cx="80" cy="80" stroke="#880E4F" stroke-width="5" />
</svg>
<svg>
<ellipse fill="#F48FB1" rx="60" ry="40" cx="80" cy="80" />
</svg>
<svg>
<ellipse fill="#F48FB1" rx="60" ry="40" cx="80" cy="80" stroke="#880E4F" stroke-width="5" />
</svg>
<svg>
<ellipse fill="#F48FB1" rx="40" ry="60" cx="80" cy="80" />
</svg>
<svg>
<ellipse fill="#F48FB1" rx="40" ry="60" cx="80" cy="80" stroke="#880E4F" stroke-width="5" />
</svg>
</div>
다각형(polygon)
svg
<div class="svgBox svg3">
<svg>
<polygon points="11.34,48.64 111.89,150.97 150.23,12.72 " fill="#f48fb1">
</svg>
<svg>
<polygon class="st0" points="-200.09,418.17 -99.54,520.49 -61.2,382.25 " fill="#f48fb1"/>
<polygon class="st0" points="142.44,114.72 80,150.76 17.56,114.72 17.56,42.62 80,6.57 142.44,42.62 " fill="#f48fb1"/>
<polygon class="st0" points="316.02,445.92 297.97,496.69 249.32,519.83 198.55,501.78 175.41,453.12 193.45,402.36 242.11,379.22
292.88,397.26 " fill="#f48fb1"/>
<polygon class="st0" points="432.57,389.7 452.41,429.9 496.76,436.34 464.67,467.63 472.24,511.8 432.57,490.94 392.9,511.8
400.48,467.63 368.38,436.34 412.74,429.9 " fill="#f48fb1"/>
<polygon class="st0" points="674.24,492.65 643.56,476.84 643.39,511.35 626.13,481.46 607.32,510.4 608.96,475.93 577.5,490.1
597.51,461.99 563.38,456.9 595.41,444.07 569.45,421.34 603.34,427.87 593.78,394.71 618.76,418.52 628.65,385.46 636.79,418.99
662.99,396.53 651.71,429.14 685.89,424.41 658.77,445.74 690.08,460.24 655.73,463.52 " fill="#f48fb1"/>
<polygon class="st0" points="850.48,507.93 827.28,469.29 830.02,514.27 820.63,470.19 808.62,513.63 814.04,468.89 788.58,506.07
808.24,465.52 772.08,492.42 803.84,460.45 760.91,474.15 801.33,454.22 756.27,453.24 800.97,447.52 758.68,431.96 802.82,441.06
767.86,412.61 806.65,435.55 782.83,397.29 812.07,431.59 801.97,387.67 818.49,429.6 823.19,384.78 825.2,429.8 844.2,388.93
831.48,432.17 862.72,399.68 836.65,436.45 876.74,415.87 840.15,442.18 884.76,435.73 841.61,448.73 885.89,457.12 840.85,455.4
880.01,477.71 837.97,461.47 867.77,495.28 833.28,466.27 " fill="#f48fb1"/>
</svg>
<svg>
<polygon class="st0" points="-201.87,354.36 -101.32,456.68 -62.98,318.44 " fill="#f48fb1"/>
<polygon class="st0" points="138.95,420.43 76.51,456.48 14.07,420.43 14.07,348.33 76.51,312.28 138.95,348.33 " fill="#f48fb1"/>
<polygon class="st0" points="150.31,76.4 132.26,127.17 83.6,150.31 32.83,132.26 9.69,83.6 27.74,32.83 76.4,9.69 127.17,27.74 " fill="#f48fb1"/>
<polygon class="st0" points="430.79,325.9 450.63,366.09 494.98,372.53 462.89,403.82 470.46,447.99 430.79,427.13 391.12,447.99
398.7,403.82 366.6,372.53 410.96,366.09 " fill="#f48fb1"/>
<polygon class="st0" points="672.46,428.84 641.79,413.03 641.61,447.54 624.35,417.65 605.54,446.59 607.18,412.12 575.72,426.29
595.73,398.18 561.6,393.09 593.64,380.26 567.67,357.53 601.56,364.06 592.01,330.9 616.98,354.71 626.88,321.65 635.02,355.18
661.21,332.72 649.93,365.33 684.11,360.6 656.99,381.93 688.3,396.43 653.95,399.71 " fill="#f48fb1"/>
<polygon class="st0" points="848.7,444.12 825.5,405.48 828.25,450.46 818.85,406.38 806.84,449.82 812.27,405.08 786.8,442.26
806.46,401.71 770.3,428.61 802.06,396.64 759.13,410.34 799.55,390.41 754.49,389.43 799.2,383.71 756.9,368.15 801.04,377.25
766.09,348.8 804.88,371.74 781.06,333.48 810.3,367.78 800.19,323.86 816.71,365.79 821.41,320.97 823.42,365.99 842.42,325.12
829.7,368.36 860.94,335.88 834.87,372.64 874.97,352.06 838.38,378.37 882.98,371.92 839.83,384.92 884.11,393.31 839.08,391.59
878.23,413.9 836.2,397.66 865.99,431.47 831.5,402.46 " fill="#f48fb1"/>
</svg>
<svg>
<polygon class="st0" points="0.67,406.68 101.22,509 139.56,370.76 " fill="#f48fb1"/>
<polygon class="st0" points="341.49,472.75 279.05,508.8 216.61,472.75 216.61,400.65 279.05,364.6 341.49,400.65 " fill="#f48fb1"/>
<polygon class="st0" points="528.08,434.43 510.04,485.2 461.38,508.34 410.61,490.29 387.47,441.63 405.52,390.86 454.18,367.73
504.95,385.77 " fill="#f48fb1"/>
<polygon class="st0" points="80,17.83 99.84,58.02 144.19,64.47 112.09,95.75 119.67,139.93 80,119.07 40.33,139.93 47.91,95.75
15.81,64.47 60.16,58.02 " fill="#f48fb1"/>
<polygon class="st0" points="833.09,132.2 802.42,116.39 802.24,150.9 784.99,121.02 766.18,149.95 767.82,115.48 736.35,129.66
756.37,101.55 722.24,96.46 754.27,83.63 728.31,60.9 762.19,67.42 752.64,34.26 777.62,58.07 787.51,25.01 795.65,58.55
821.85,36.08 810.56,68.7 844.75,63.96 817.62,85.3 848.94,99.79 814.59,103.08 " fill="#f48fb1"/>
<polygon class="st0" points="1051.24,496.43 1028.04,457.8 1030.79,502.78 1021.39,458.7 1009.38,502.14 1014.81,457.4
989.34,494.58 1009,454.03 972.84,480.93 1004.6,448.95 961.67,462.66 1002.09,442.73 957.03,441.75 1001.74,436.02 959.44,420.47
1003.58,429.57 968.63,401.12 1007.42,424.06 983.6,385.8 1012.84,420.1 1002.73,376.18 1019.25,418.11 1023.95,373.29
1025.96,418.31 1044.96,377.44 1032.24,420.68 1063.48,388.19 1037.41,424.96 1077.51,404.38 1040.92,430.68 1085.52,424.24
1042.37,437.24 1086.65,445.62 1041.62,443.91 1080.77,466.22 1038.74,449.98 1068.53,483.79 1034.04,454.78 " fill="#f48fb1"/>
</svg>
<svg>
<polygon class="st0" points="-704.92,397.6 -604.36,499.92 -566.03,361.68 " fill="#f48fb1"/>
<polygon class="st0" points="-364.1,463.67 -426.54,499.72 -488.98,463.67 -488.98,391.57 -426.54,355.52 -364.1,391.57 " fill="#f48fb1"/>
<polygon class="st0" points="-177.5,425.35 -195.55,476.12 -244.21,499.26 -294.98,481.21 -318.12,432.55 -300.07,381.78
-251.41,358.65 -200.64,376.69 " fill="#f48fb1"/>
<polygon class="st0" points="-476.25,22.47 -456.42,62.66 -412.06,69.1 -444.16,100.39 -436.58,144.56 -476.25,123.7
-515.92,144.56 -508.35,100.39 -540.44,69.1 -496.09,62.66 " fill="#f48fb1"/>
<polygon class="st0" points="127.51,123.12 96.83,107.31 96.66,141.82 79.4,111.94 60.59,140.87 62.23,106.4 30.77,120.58
50.78,92.47 16.65,87.38 48.68,74.55 22.72,51.82 56.61,58.35 47.05,25.18 72.03,49 81.92,15.93 90.06,49.47 116.26,27.01
104.98,59.62 139.16,54.88 112.04,76.22 143.35,90.71 109,94 " fill="#f48fb1"/>
<polygon class="st0" points="345.65,487.35 322.46,448.72 325.2,493.7 315.8,449.62 303.79,493.06 309.22,448.32 283.75,485.5
303.41,444.95 267.25,471.85 299.01,439.88 256.08,453.58 296.5,433.65 251.45,432.67 296.15,426.94 253.85,411.39 297.99,420.49
263.04,392.04 301.83,414.98 278.01,376.72 307.25,411.02 297.14,367.1 313.66,409.03 318.36,364.21 320.37,409.23 339.37,368.36
326.65,411.6 357.89,379.11 331.83,415.88 371.92,395.3 335.33,421.61 379.93,415.16 336.78,428.16 381.06,436.54 336.03,434.83
375.19,457.14 333.15,440.9 362.94,474.71 328.46,445.7 " fill="#f48fb1"/>
</svg>
<svg>
<polygon class="st0" points="-964.16,48.64 -863.6,150.97 -825.26,12.72 " fill="#f48fb1"/>
<polygon class="st0" points="-623.34,114.72 -685.78,150.76 -748.22,114.72 -748.22,42.62 -685.78,6.57 -623.34,42.62 " fill="#f48fb1"/>
<polygon class="st0" points="-436.74,76.4 -454.79,127.17 -503.45,150.31 -554.22,132.26 -577.35,83.6 -559.31,32.83 -510.65,9.69
-459.88,27.74 " fill="#f48fb1"/>
<polygon class="st0" points="-884.83,-340.2 -864.99,-300.01 -820.64,-293.56 -852.73,-262.28 -845.15,-218.11 -884.83,-238.96
-924.5,-218.11 -916.92,-262.28 -949.01,-293.56 -904.66,-300.01 " fill="#f48fb1" />
<polygon class="st0" points="-131.73,-225.83 -162.41,-241.64 -162.58,-207.13 -179.84,-237.01 -198.65,-208.08 -197.01,-242.55
-228.47,-228.37 -208.46,-256.49 -242.59,-261.57 -210.55,-274.4 -236.52,-297.13 -202.63,-290.61 -212.18,-323.77 -187.21,-299.96
-177.31,-333.02 -169.17,-299.48 -142.98,-321.95 -154.26,-289.33 -120.08,-294.07 -147.2,-272.74 -115.89,-258.24 -150.24,-254.95
" fill="#f48fb1"/>
<polygon class="st0" points="109.4,138.4 86.2,99.76 88.95,144.75 79.55,100.67 67.54,144.11 72.96,99.37 47.5,136.55 67.16,96
31,122.9 62.76,90.92 19.83,104.62 60.25,84.7 15.19,83.71 59.89,77.99 17.6,62.43 61.74,71.54 26.78,43.09 65.57,66.03
41.75,27.77 70.99,62.06 60.89,18.15 77.41,60.07 82.11,15.25 84.12,60.27 103.12,19.41 90.4,62.64 121.64,30.16 95.57,66.92
135.67,46.34 99.08,72.65 143.68,66.21 100.53,79.21 144.81,87.59 99.77,85.88 138.93,108.19 96.89,91.94 126.69,125.76 92.2,96.75
" fill="#f48fb1"/>
</svg>
</div>
패스(path)
svg
<div class="svgBox svg3">
<svg class="svg">
<path fill="none" stroke="#880E4F" stroke-width="2" d="M7,154.667c0-82.358,65.152-149,145.667-149"/>
</svg>
<svg class="svg">
<path fill="none" stroke="#880E4F" stroke-width="2" d="M151.534,123.547c-33.711,33.711-88.369,33.711-122.08,0
c-26.97-26.969-26.97-70.695,0-97.665c21.575-21.576,56.556-21.576,78.131,0c17.261,17.26,17.261,45.245,0.001,62.504
c-13.809,13.809-36.196,13.809-50.005,0c-11.046-11.046-11.046-28.956,0-40.002c8.837-8.837,23.166-8.837,32.003,0
c7.069,7.07,7.07,18.532,0,25.602c-5.656,5.657-14.826,5.657-20.482,0c-4.524-4.524-4.524-11.86,0-16.385"/>
</svg>
<svg class="svg">
<path fill="none" stroke="#880E4F" stroke-width="2" d="M82.671,81.243c50.565,48.259,14.182,69.191-2.135,1.229
c16.316,67.962-25.611,65.895-2.46-0.122c-23.151,66.017-57.304,41.617-2.004-1.432c-55.3,43.049-70.84,4.057-0.912-2.288
c-69.929,6.345-61.919-34.86,0.47-2.417c-62.389-32.442-33.374-62.777,1.703-1.78c-35.076-60.997,5.73-70.826,2.395-0.577
c3.335-70.249,42.981-56.458,2.326,0.81c40.655-57.268,66.554-24.232,1.521,1.938c65.033-26.17,68.953,15.62,0.23,2.452
C152.526,92.225,133.236,129.502,82.671,81.243z"/>
</svg>
<svg class="svg">
<path fill="none" stroke="#880E4F" stroke-width="2" d="M131.502,129.683c-44.4-42.871-49.621-39.867-34.943,20.102
c-14.678-59.969-20.694-60.265-40.261-1.983c19.566-58.281,14.666-61.783-32.799-23.436C70.963,86.018,68.733,80.421,8.573,86.918
c60.16-6.497,61.31-12.409,7.692-39.569c53.617,27.16,57.781,22.808,27.864-29.131c29.917,51.938,35.772,50.527,39.189-9.441
c-3.417,59.969,2.272,61.948,38.075,13.245c-35.803,48.703-32.086,53.443,24.869,31.726C89.308,75.465,89.87,81.462,150.03,93.884
C89.87,81.462,87.102,86.812,131.502,129.683z"/>
</svg>
<svg class="svg">
<path fill="none" stroke="#880E4F" stroke-width="2" d="M58.665,139.312c0-6.873,42-6.873,42-13.747s-42-6.874-42-13.748
s42-6.874,42-13.748c0-6.872-42-6.872-42-13.744c0-6.874,42-6.874,42-13.747c0-6.877-42-6.877-42-13.753
c0-6.874,42-6.874,42-13.748c0-6.878-42-6.878-42-13.757s42-6.879,42-13.758"/>
</svg>
<svg class="svg">
<path fill="none" stroke="#880E4F" stroke-width="2" d="M93.108,91.478c42.049,30.58-13.048,57.425-13.347,6.503
c0.299,50.922-55.041,24.58-13.405-6.381c-41.636,30.961-55.545-28.728-3.37-14.458c-52.176-14.27-14.181-62.359,9.204-11.649
c-23.385-50.71,37.901-50.989,14.846-0.067c23.055-50.922,61.484-3.179,9.309,11.565C148.521,62.245,135.157,122.058,93.108,91.478
z"/>
</svg>
</div>
라인(line, polyline)
svg
<div class="svgBox svg3">
<svg>
<line x1="0" y1="0" x2="200" y2="200" stroke="#0D47A1" stroke-width="2" fill="none" />
</svg>
<svg>
<line x1="50" y1="50" x2="200" y2="200" stroke="#0D47A1" stroke-width="2" fill="none" />
</svg>
<svg>
<line x1="100" y1="100" x2="200" y2="200" stroke="#0D47A1" stroke-width="2" fill="none" />
</svg>
<svg>
<polyline points="21,17.2 21,139.2 117,52.2" stroke="#0D47A1" stroke-width="2" fill="none" />
</svg>
<svg>
<polyline points="21,17.2 21,139.2 122,28.2 141,139.2" stroke="#0D47A1" stroke-width="2" fill="none" />
</svg>
<svg>
<polyline points="21,17.2 21,139.2 122,28.2 141,139.2 23.5,11.7" stroke="#0D47A1" stroke-width="2" fill="none" />
</svg>
</div>
클리핑 마스크(Clip-path)
svg
<div class="svgBox svg3">
<svg>
<image xlink:href="img/bg.jpg" width="160" height="160">
</svg>
<svg>
<image xlink:href="img/bg.jpg" width="160" height="160" clip-path="circle(60px at center)">
</svg>
<svg>
<clipPath id="clipPath1">
<polygon points="11.34,48.64 111.89,150.97 150.23,12.72 " fill="#f48fb1">
</clipPath>
<image xlink:href="img/bg.jpg" width="160" height="160" clip-path="url(#clipPath1)">
</svg>
<svg>
<clipPath id="clipPath2">
<polygon class="st0" points="-200.09,418.17 -99.54,520.49 -61.2,382.25 " fill="#f48fb1"/>
<polygon class="st0" points="142.44,114.72 80,150.76 17.56,114.72 17.56,42.62 80,6.57 142.44,42.62 " fill="#f48fb1"/>
<polygon class="st0" points="316.02,445.92 297.97,496.69 249.32,519.83 198.55,501.78 175.41,453.12 193.45,402.36 242.11,379.22
292.88,397.26 " fill="#f48fb1"/>
<polygon class="st0" points="432.57,389.7 452.41,429.9 496.76,436.34 464.67,467.63 472.24,511.8 432.57,490.94 392.9,511.8
400.48,467.63 368.38,436.34 412.74,429.9 " fill="#f48fb1"/>
<polygon class="st0" points="674.24,492.65 643.56,476.84 643.39,511.35 626.13,481.46 607.32,510.4 608.96,475.93 577.5,490.1
597.51,461.99 563.38,456.9 595.41,444.07 569.45,421.34 603.34,427.87 593.78,394.71 618.76,418.52 628.65,385.46 636.79,418.99
662.99,396.53 651.71,429.14 685.89,424.41 658.77,445.74 690.08,460.24 655.73,463.52 " fill="#f48fb1"/>
<polygon class="st0" points="850.48,507.93 827.28,469.29 830.02,514.27 820.63,470.19 808.62,513.63 814.04,468.89 788.58,506.07
808.24,465.52 772.08,492.42 803.84,460.45 760.91,474.15 801.33,454.22 756.27,453.24 800.97,447.52 758.68,431.96 802.82,441.06
767.86,412.61 806.65,435.55 782.83,397.29 812.07,431.59 801.97,387.67 818.49,429.6 823.19,384.78 825.2,429.8 844.2,388.93
831.48,432.17 862.72,399.68 836.65,436.45 876.74,415.87 840.15,442.18 884.76,435.73 841.61,448.73 885.89,457.12 840.85,455.4
880.01,477.71 837.97,461.47 867.77,495.28 833.28,466.27 " fill="#f48fb1"/>
</clipPath>
<image xlink:href="img/bg.jpg" width="160" height="160" clip-path="url(#clipPath2)">
</svg>
<svg>
<clipPath id="clipPath3">
<polygon class="st0" points="0.67,406.68 101.22,509 139.56,370.76 " fill="#f48fb1"/>
<polygon class="st0" points="341.49,472.75 279.05,508.8 216.61,472.75 216.61,400.65 279.05,364.6 341.49,400.65 " fill="#f48fb1"/>
<polygon class="st0" points="528.08,434.43 510.04,485.2 461.38,508.34 410.61,490.29 387.47,441.63 405.52,390.86 454.18,367.73
504.95,385.77 " fill="#f48fb1"/>
<polygon class="st0" points="80,17.83 99.84,58.02 144.19,64.47 112.09,95.75 119.67,139.93 80,119.07 40.33,139.93 47.91,95.75
15.81,64.47 60.16,58.02 " fill="#f48fb1"/>
<polygon class="st0" points="833.09,132.2 802.42,116.39 802.24,150.9 784.99,121.02 766.18,149.95 767.82,115.48 736.35,129.66
756.37,101.55 722.24,96.46 754.27,83.63 728.31,60.9 762.19,67.42 752.64,34.26 777.62,58.07 787.51,25.01 795.65,58.55
821.85,36.08 810.56,68.7 844.75,63.96 817.62,85.3 848.94,99.79 814.59,103.08 " fill="#f48fb1"/>
<polygon class="st0" points="1051.24,496.43 1028.04,457.8 1030.79,502.78 1021.39,458.7 1009.38,502.14 1014.81,457.4
989.34,494.58 1009,454.03 972.84,480.93 1004.6,448.95 961.67,462.66 1002.09,442.73 957.03,441.75 1001.74,436.02 959.44,420.47
1003.58,429.57 968.63,401.12 1007.42,424.06 983.6,385.8 1012.84,420.1 1002.73,376.18 1019.25,418.11 1023.95,373.29
1025.96,418.31 1044.96,377.44 1032.24,420.68 1063.48,388.19 1037.41,424.96 1077.51,404.38 1040.92,430.68 1085.52,424.24
1042.37,437.24 1086.65,445.62 1041.62,443.91 1080.77,466.22 1038.74,449.98 1068.53,483.79 1034.04,454.78 " fill="#f48fb1"/>
</clipPath>
<image xlink:href="img/bg.jpg" width="160" height="160" clip-path="url(#clipPath3)">
</svg>
<svg>
<clipPath id="clipPath4">
<polygon class="st0" points="-201.87,354.36 -101.32,456.68 -62.98,318.44 " fill="#f48fb1"/>
<polygon class="st0" points="138.95,420.43 76.51,456.48 14.07,420.43 14.07,348.33 76.51,312.28 138.95,348.33 " fill="#f48fb1"/>
<polygon class="st0" points="150.31,76.4 132.26,127.17 83.6,150.31 32.83,132.26 9.69,83.6 27.74,32.83 76.4,9.69 127.17,27.74 " fill="#f48fb1"/>
<polygon class="st0" points="430.79,325.9 450.63,366.09 494.98,372.53 462.89,403.82 470.46,447.99 430.79,427.13 391.12,447.99
398.7,403.82 366.6,372.53 410.96,366.09 " fill="#f48fb1"/>
<polygon class="st0" points="672.46,428.84 641.79,413.03 641.61,447.54 624.35,417.65 605.54,446.59 607.18,412.12 575.72,426.29
595.73,398.18 561.6,393.09 593.64,380.26 567.67,357.53 601.56,364.06 592.01,330.9 616.98,354.71 626.88,321.65 635.02,355.18
661.21,332.72 649.93,365.33 684.11,360.6 656.99,381.93 688.3,396.43 653.95,399.71 " fill="#f48fb1"/>
<polygon class="st0" points="848.7,444.12 825.5,405.48 828.25,450.46 818.85,406.38 806.84,449.82 812.27,405.08 786.8,442.26
806.46,401.71 770.3,428.61 802.06,396.64 759.13,410.34 799.55,390.41 754.49,389.43 799.2,383.71 756.9,368.15 801.04,377.25
766.09,348.8 804.88,371.74 781.06,333.48 810.3,367.78 800.19,323.86 816.71,365.79 821.41,320.97 823.42,365.99 842.42,325.12
829.7,368.36 860.94,335.88 834.87,372.64 874.97,352.06 838.38,378.37 882.98,371.92 839.83,384.92 884.11,393.31 839.08,391.59
878.23,413.9 836.2,397.66 865.99,431.47 831.5,402.46 " fill="#f48fb1"/>
</clipPath>
<image xlink:href="img/bg.jpg" width="160" height="160" clip-path="url(#clipPath4)">
</svg>
</div>
클리핑 마스크(Clip-path)
svg
SVG
SVG
SVG
SVG
<svg>
<text fill="#f48fb1" x="7" y="110" font-family="SCoreDream" font-size="70" font-weigt="900">SVG</text>
</svg>
<svg>
<pattern id="pattern1" patternunites="useSpaceOuUse" width="100%" height="100%">
<image xlink:href="img/bg.jpg" width="160" height="160" />
</pattern>
<text fill="url(#pattern1)" x="7" y="110" font-family="SCoreDream" font-size="70" font-weight="900">SVG</text>
</svg>
.svg7 {display: flex;}
.text-wrap {
background-color: #e3f3fd;
width: 160px;
height: 160px;
margin: 6px;
display: inline-block;
overflow: hidden;
}
.text-clip {
font-size: 70px;
text-align: center;
font-family: 'SCoreDream';
text-transform: uppercase;
line-height: 170px;
-webkit-text-fill-color: #0d47a1;
}
.text-clip.c2 {
-webkit-text-fill-color: transparent;
-webkit-background-clip: text;
background-image: url(img/bg.jpg);
background-size: 100%;
}
.text-clip.c3 {
-webkit-text-fill-color: transparent;
-webkit-background-clip: text;
background-image: linear-gradient(60deg, #ff5858, #f09819);
}
.text-clip.c4 {
-webkit-text-fill-color: transparent;
-webkit-background-clip: text;
-webkit-text-stroke: 2px #0d47a1;
}
애니메이션
svg
.ani1 {
width: 100px; height: 100px;
x: 30px; y: 30px;
fill: none;
stroke: #880E41;
stroke-width: 2px;
stroke-dasharray: 50;
stroke-dashoffset: 50;
animation: ani1 1s infinite linear alternate-reverse;
}
@keyframes ani1 {
0% {stroke-dashoffset: 50;}
100% {stroke-dashoffset: 0;}
}
.ani2 {
width: 100px; height: 100px;
x: 30px; y: 30px;
fill: none;
stroke: #880E41;
stroke-width: 2px;
stroke-dasharray: 400;
stroke-dashoffset: 400;
animation: ani2 2s infinite linear alternate-reverse;
}
@keyframes ani2 {
0% {stroke-dashoffset: 400;}
100% {stroke-dashoffset: 0;}
}
.ani3 {
animation: ani3 1s infinite linear alternate-reverse;
stroke-dasharray: 230px;
stroke-dashoffset: 230px;
}
@keyframes ani3 {
0% {stroke-dashoffset: 230px;}
100% {stroke-dashoffset: 0;}
}
.ani4 {
animation: ani4 1s infinite linear alternate-reverse;
stroke-dasharray: 605px;
stroke-dashoffset: 605px;
}
@keyframes ani4 {
0% {stroke-dashoffset: 605px;}
100% {stroke-dashoffset: 0;}
}
.ani5 {
animation: ani5 1s infinite linear alternate-reverse;
stroke-dasharray: 411px;
stroke-dashoffset: 411px;
}
@keyframes ani5 {
0% {stroke-dashoffset: 411px;}
100% {stroke-dashoffset: 0;}
}
.ani6 {
animation: ani6 1s infinite linear alternate-reverse;
stroke-dasharray: 614px;
stroke-dashoffset: 614px;
}
@keyframes ani6 {
0% {stroke-dashoffset: 614px;}
100% {stroke-dashoffset: 0;}
}