简体   繁体   中英

Does iOS support SVG Tiny?

I try to use svg file as some element's background image. When I save image as SVG 1.0/1.1 in Adobe Illustrator, it displays correct in my app. If I save image as SVG Tiny 1.1/1.1+/1.2 it doesn't displays in app.

I use next css:

background-image: url(img.svg);

Does iOS support SVG Tiny? Or what I must to do, that my SVG Tiny image will display in app as background image?

Yes, iOS and pretty much any browser/device that supports SVG also supports SVG Tiny. However, SVG Tiny is a subset of SVG intended for devices with poor performance, it will discard gradients, opacity, embedded fonts and filters. What is probably happening is that the features you are using in your file are being discarded by the Tiny format. SVG Tiny does nothing to save on file size.

In summary, just use SVG 1.1.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM