font-awesome

Font-awesome class with multiple different icons

筅森魡賤 提交于 2019-12-03 17:14:04
I want to create custom font-awesome class with multiple icons in it, i.e. .2star class consisting of 2 stars and 3 empty stars in a line, beside each other. Is there a way to do it in CSS or I have to use html-only solution with multiple i-classes ? Yes you create a custom font awesome class, with multiple characters in content like this .class:after { content: "\f005\f005\f005"; /* 3 Stars */ font-family: FontAwesome; } Demo Note that the values like \f005 etc can be found in FontAwesome stylesheet so copy the unicode of the type of font you like and use it in the content property with the

How to create custom Font Awesome 5 SVG definition?

£可爱£侵袭症+ 提交于 2019-12-03 16:47:12
I want to add a new custom SVG icon to Fontawesome 5 and assume that I need to create a definition for it in the JavaScript file. var icons = { "address-book": [448, 512, [], "f2b9", "M436 160c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-20V48c0-26.51-21.49-48-48-48H48C21.49 0 0 21.49 0 48v416c0 26.51 21.49 48 48 48h320c26.51 0 48-21.49 48-48v-48h20c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-20v-64h20c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-20v-64h20zm-228-32c44.183 0 80 35.817 80 80s-35.817 80-80 80-80-35.817-80-80 35.817-80 80-80zm128 232c0 13.255-10.745 24-24

Use FontAwesome icon inside a ::before pseudo element with attr()

ぐ巨炮叔叔 提交于 2019-12-03 16:37:01
问题 I am trying to insert a FontAwesome icon inside a ::before pseudo element with attr() . The original code is more complex, however this will give you an idea of what I want: <div data-background-icon="\f086"></div> div::before { content: attr(data-background-icon); font-family: "FontAwesome"; } https://jsfiddle.net/grutcop8/ It doesn't work, while the usual way to embed it works OK: div::before { content: "\f086"; font-family: "FontAwesome"; } Anything I am missing? 回答1: Try with Unicode CSS

I'm using PhoneGap and in my pages I'm trying to use FontAwesome but it doesn't work?

喜欢而已 提交于 2019-12-03 16:02:17
I created application with PhoneGap for Android and I'm using FontAwesome icons in my app, but I can't see icons but just squares. I include FontAwesome like this <link rel="stylesheet" href="font-awesome/css/font-awesome.min.css"> And I'm using it like this <i class="icon-circle "></i> Do I need to move the FontAwesome folder somewhere else, now it is in www->fontawesome and the file from which I'm calling it it's also in www folder, or I need to do something else I can find any useful answer? https://github.com/FortAwesome/Font-Awesome/issues/1094 I think this explains it You have to go into

FontAwesome displaying as squares on WP8 using cordova/phonegap

試著忘記壹切 提交于 2019-12-03 15:19:18
I am using the AngularMobileUI framework and the icons just display as squares. I have previously tried the Ionic framework and that did the same. Anyone know how to fix this, and also why it happens? My icons display fine on android and ios Gillardo Encase someone has this problem, i found part of the answer here Getting a web-font to work on an HTML5 Windows Phone App? FontAwesome has the embeddable flag set to 4. First you need to set the value to zero. Once that is done, you need to change the css and remove the querystring when loading the font file. @font-face { font-family: 'FontAwesome

References to font (font-awesome) resources are not updated in yeoman/angular grunt build

半腔热情 提交于 2019-12-03 15:01:25
问题 I'm aware of the SO threads about this (I've linked them below), but unfortunately I couldn't solve this with them, so please allow me this question :-) I've bootstrapped an AngularJS project with Yeoman and thus rely on a grunt.js build utilizing bower.js and SCSS. I want to use font-awesome and the glyphicons-halflings-regular from bootstrap-sass-official. When running "grunt serve" everything is fine, but when I want to create a fileset for distribution, the references to the font files

How to use Font Awesome symbol as marker in matplotlib

谁说胖子不能爱 提交于 2019-12-03 14:25:17
问题 Is it possible to use a font-awesome icon as a marker in a scatterplot with matplotlib? Or is it possible to use it as a font and put the icon as a 'text'? This question has originally been asked here, but has been closed for an unknown reason. Since I consider it a valid and useful problem, which hasn't been addressed anywhere on Stackoverflow and sure deserves an answer, I will simply ask it again. 回答1: FontAwesome is available from here. It provides its icons as vector graphics and as well

Toggle font awesome class on button click

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-03 14:12:55
I have the code as here in this jsfiddle , I want the font awesome icon to change on button click using javascript, but it does'nt seem to work. I'm new to javascript so please forgive me if this was a dumb question. HTML <button id="favBtn" onclick="fav();"> <i id="favIcon" class="fa fa-star-o"></i> Favourite </button> Javascript function fav() { document.getElementById("favIcon").toggleClass('fa-star-o fa-star'); } When using jQuery you never need to use an inline attribute eventHandler. onclick= Demo 1 uses jQuery .toggleClass() Demo 2 uses JavaScript .classList.toggle() Demo 3 uses CSS

Font Awesome Image Overlay

筅森魡賤 提交于 2019-12-03 13:08:19
问题 I'm currently creating a image gallery (using Zurb Foundation as Framework) and would like to show the zoom icon on image hover (like this example here: http://codepen.io/Twikito/pen/Jeaub). But I would like the icon to be a font (Font Awesome) icon and not just one but 3 individual clickable icons.. Would that be possible? 回答1: I've put a quick JSfiddle together using font-awesome. The CSS is hacked together but demonstrates what's possible. It should give you a starting point to experiment

Font Awesome icons not working in OSX Safari

北慕城南 提交于 2019-12-03 13:05:12
My font-awesome icons are working fine in Firefox and Chrome, but in Safari I just see blank space for some of them but not others. Screenshot: As you can see, the icons for fa-twitter , fa-instagram and others just aren't showing up, either on the Font Awesome website or when I try to use them with <i class="fa fa-instagram"></i> . Really bizarre, I've cleared my cache a dozen times and can't figure out what else could be going wrong here. Any ideas? There may be another issue at play--I was having a similar issue where a custom-generated icon set (using Font Custom) would display in Chrome,