1
0
Fork 0
management/front/dkha-web-sz-main/node_modules/svg-sprite-loader/examples/browser-sprite
zhurui 54669c07cf i4 2023-12-18 13:12:25 +08:00
..
build i4 2023-12-18 13:12:25 +08:00
README.md i4 2023-12-18 13:12:25 +08:00
demo.html i4 2023-12-18 13:12:25 +08:00
main.js i4 2023-12-18 13:12:25 +08:00
webpack.config.js i4 2023-12-18 13:12:25 +08:00

README.md

Default browser runtime example

In browser sprite is rendered and injected in page automatically, you just refer to images via <svg><use xlink:href="#id"></use></svg>.

Demo

Input

import twitterIcon from '../assets/twitter.svg';

Reference in HTML

<svg>
  <use xlink:href="#twitter"></use>
</svg>

Input

Output