SVG

From mmmv_kos
Jump to: navigation, search

HTML : CSS

JavaScript


Skaleerimine

SVG-failid on tavalised xml-failid ja selle asemel, et neid tõesti vektor-graafika-piltidena tõlgendada, on veebilehitsejates hakatud neid hoopis struktureeritud tekstina käsitlema, kuni selleni välja, et nende sisu võib SVG-silti kasutades kohati lausa HTML-dokumenti kirjutada. SVG-failide kasutamine HTML-is on üks häda, rist ja viletsus. Erinevaid viiteid:


Minu tähelepanekuid

Pärast SVG-toimetitega tegutsemist tuleb SVG-fail ise tekstitoimetiga lahti võtta ja lisada sinna svg-sildi sisse:

viewBox="0 0 272 272" preserveAspectRatio="xMidYMid meet"


Näidisfail:

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 272 272" preserveAspectRatio="xMidYMid meet"><path d="m213.67 638.22c-1.793-1.093-4.153-3.454-5.246-5.246-1.952-3.202-1.987-5.267-1.989-117.26-.002-106.56.112-114.22 1.746-117.43.962-1.886 3.02-4.361 4.572-5.5 2.812-2.063 3.286-2.072 117.5-2.326 107.66-.24 114.89-.148 118.16 1.5 1.914.965 4.502 3.284 5.75 5.153l2.27 3.398-.004 114.6c-.004 112.59-.039 114.66-1.991 117.86-1.093 1.793-3.454 4.153-5.246 5.246-3.079 1.877-5.095 1.987-36.519 1.991l-33.26.004.26-48.25.26-48.25 14.978-.278c8.238-.153 15.402-.702 15.921-1.221 1.01-1.01 5.587-33.99 4.895-35.25-.226-.413-7.773-.75-16.771-.75-8.998 0-17.07-.273-17.941-.607-1.346-.517-1.582-2.863-1.58-15.75.002-23.736 1.883-25.824 23.998-26.643l13.5-.5v-16.5-16.5l-7-.822c-11.11-1.304-33.06-.233-39.5 1.927-8.463 2.839-16.788 9.06-21.673 16.2-6.804 9.943-7.644 13.764-8.07 36.695-.314 17.07-.608 20.18-2.01 21.25-1.14.87-6.145 1.25-16.469 1.25h-14.831l.273 18.25.273 18.25 14.931.278c8.93.166 15.461.718 16.25 1.372 1.058.878 1.319 10.468 1.319 48.47v47.38l-61.75-.004c-59.853-.004-61.85-.065-65.01-1.991" fill="#3b5998" transform="translate(-206.43-390.37)" bbox="206.43 390.37 249.99 249.85"/></svg>