Comments (4)
@saboorazizi You can load the entire SVG library once (even as n external file for cache advantages), and use the tag to show the icons you want. Demo:
https://cdn.rawgit.com/danklammer/bytesize-icons/master/examples/bytesize-symbols.html
<use xlink:href="/icons/bytesize-icons.svg#i-search" />
Note: This doesn't work for IE, so you'd you need to use a polyfill like SVG4Everybody:
https://github.com/jonathantneal/svg4everybody
from bytesize-icons.
OK, I found a way to do it. The trick is to use xmlns="http://www.w3.org/2000/svg”
, and I also base64
encode it. That works. Now I have run into another issue, which I believe it can’t be fixed. It seems stroke=“currentcolor”
will not work, the icon will be rendered black. Does anyone knows a way so that the icon will inherit the colour?
from bytesize-icons.
Since you are rendering the SVG as an image you won't be able to manipulate fills or stroke from DOM.
from bytesize-icons.
Hi ! I am new to html, css and others, and I am sorry if my question is not appropriate.
I search a lot to fine hoe could I load the SVG icons in to a CSS file and then use it in a project or a php file. I don't want to have the SVG tag inside my php or html tags.
Before I use glyphicon with bootstrap, inside a span tag. Can I load it in a span/id or class and the source should be out side of the file:
<link href="../style/css/bytesize.css" rel="stylesheet">
Thank you!
from bytesize-icons.
Related Issues (20)
- Icon Request Phone Icon HOT 1
- 1.2 not published to npm HOT 1
- SVG symbols missing new icons HOT 1
- Full-screen Icon? HOT 2
- Filter icon HOT 2
- Feed icon HOT 5
- Sun and moon icons HOT 5
- Icons for Zoom-In and Zoom-Out
- "Stop" Icon request
- Add to packagist? HOT 1
- Shield Icon contribution Help wanted HOT 2
- Add Vue.js for displaying icons on inline.html
- Git Icon Request HOT 2
- Icons are not visible in certain applications HOT 1
- Would this work as an icon def system? HOT 1
- hai
- 创建安全模式
- Bower installation
- hi! Can be used on native react? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bytesize-icons.