benhowdle89/svgeezy
소개
SVG를 처리하지 못하는 브라우저에 이미지 대체 항목을 자동으로 제공합니다.
디자인 및 미디어측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalSVGeezy
A JavaScript plugin to handle your images in browsers that don't support SVGs
SVGeezy is in essence, a fallback plugin. It allows you to use SVGs for all your assets, giving you complete resolution independence.
It checks if the browser supports SVGs, if not, changes the src of the image to a .png instead (or whatever you pass in).
Installing SVGeezy
SVGeezy can being installed using bower with bower install svgeezy. Alternatively, you can download or clone this repo manually.
Use
svgeezy.init('nocheck', 'png'); // this will tell the plugin to not check images with a class of 'nocheck'
or
svgeezy.init(false, 'png'); // this will let the plugin check all images
or
Check out this JSFiddle for example usage
The first parameter is a class to tell the code not to check. Feel free to pass in false if you want SVGeezy to check all images. This may be because you have no fallbacks for certain SVGs.
The second is a filetype, this can be anything you want, just make sure the file path resolves to an image. ie. '/images/logo.svg', will be replaced with '/images/logo.png'.
관련 프로젝트 살펴보기
불러오는 중…