font-awesome

Style SVG loaded to HTML as content tag with CSS [closed]

自作多情 提交于 2019-12-12 04:08:43
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . I have 3 files: index.html <!DOCTYPE html> <html> <head> <link type="text/css" rel="stylesheet" href="style.css" /> </head> <body> <i class="logo myRed" aria-hidden="true"></i> </body> </html> style.css .logo:before { content: url("logo.svg"); } .myRed { color: #ff2000; } logo.svg

Font-Awesome-Rails CSS spinner not working in Safari

被刻印的时光 ゝ 提交于 2019-12-12 03:24:09
问题 I'm using the font-awesome-rails gem to show a css spinner when the submit button of a form_for is clicked. The spinner works perfectly in Chrome and Firefox but doesn't appear in Safari. I'm on OSX El Capitan 10.11.15 and hosting on Heroku. I'm also using Bootstrap 3. My submit button looks like this: <%= f.submit "Save Changes", class: "btn btn-default", data: {disable_with: "<i class='fa fa-spinner fa-spin'></i> Saving Changes..."} %> 回答1: I think your html is generated uncorrectly and

Add Font Awesome Icon To Class

 ̄綄美尐妖づ 提交于 2019-12-12 03:09:29
问题 Does anyone know how to add a specific font awesome icon to it's own class? For example, I'm using this icon: <i class="fa fa-home" aria-hidden="true"></i> and have added: .fa-home{ background: #ff0019; padding: 5.2px 6.5px 8.5px 6.5px; border-radius: 50%; } .fa-home:hover{ background: #333; } .fa-home:before { color:#FFFFFF; } However, i want to use .fa-home in different areas of my website without that specific style. Any ideas? 回答1: Add an id to that particular font awesome icon that you

Using FontAwesome in ggplot2 as a replacement for points

北城余情 提交于 2019-12-12 03:05:59
问题 This is probably a fairly basic thing, but I can't seem to find a meaningful answer. I am trying to use the fontawesome package in R to use emojis as points in a ggplot2 chart, but I am having a hard time figuring out how to assign a different emoji to each variable. Here's some sample data (we'll call the data frame 'sample'): month number variable 1 456550 var1 2 374616 var1 3 462086 var1 4 436376 var1 5 497526 var1 6 488574 var1 1 119884 var2 2 126356 var2 3 129338 var2 4 177496 var2 5

How to center an icon in a circular background

前提是你 提交于 2019-12-12 02:19:45
问题 I am trying to create a circular background around an icon (fontawesome 4.0). Consider the following code: <span class="participant img-circle"><i class="fa fa-user" data-original-title="" title=""></i></span> .participant{ background: @gray-light; display: inline-block; width: 100px; height: 100px; } .participant i { font-size: 50px; } This creates the background fine, but the icon is not centered in the circle. What am I doing wrong? 回答1: You could use the border-radius property. http:/

Compile RMarkdown PDF with Waffle Chart and Glyphs FAILURE. MWE included

偶尔善良 提交于 2019-12-12 02:17:22
问题 I am unable to compile PDF using RMarkdown, the waffle package, and glyphs It doesn't matter if I use the TIKZ device or PDF rendering. The document compiles without a problem to HTML. The only work around I can think of right now is to create SVG graphic with the HTML compiler, then to reference those files in my intermediate .TEX file. Notice that if you simply run the code below the line that says, " ## ---- waffle_figure ---- ". It should create the chart given that you've previously

Add/remove class to a button

扶醉桌前 提交于 2019-12-12 01:48:38
问题 I'm having problem adding new class to a button. Button arrow should be showing right(fa-angle-right) when sidebar is closed. And left (fa-angle-left) again when it's open. https://jsfiddle.net/tjkzmvLg/ HTML <div> <button id="sidebarToggle" class="btn btn-primary btn-sm"> <i class="fa fa-angle-left"></i> </button> </div> JS (function() { var $sidebarAndWrapper = $("#sidebar, #wrapper"); var $icon = $("#sidebarToogle i.fa"); $("#sidebarToggle").on("click", function () { $sidebarAndWrapper

Make a collection of SVG files into something like FontAwesome's JS?

走远了吗. 提交于 2019-12-11 23:36:45
问题 I'm not sure if there's already a question like this and possible duplicate of this but I'd like to know how to make a collection of SVG files into something exactly like FontAwesome's JS? I wish to use all the icons from this pack, and make them available to be called and used in HTML like FontAwesome's JS for example <i class="icon-leaf"></i> , <i class="icon-sun"></i> , or <i class="icon-rainbow"></i> . I've seen some online tools like https://icomoon.io/app/ or http://fontello.com/ but

In LESS, can I loop over class/mixin “patterns”?

五迷三道 提交于 2019-12-11 20:35:11
问题 I need loop over 400+ Font Awesome icon variables (look at the source) by a "pattern", I mean the pattern is @fa-var-* , i.e. @fa-var-apple , @fa-var-archive and so on. Purpose is create some custom class like .btn-apple , .btn-archive and using the unicode value inside the variable. Is this possible in LESS? 回答1: You can create multiple classes dynamically by using array loops like below. However, the array list values have to be defined prior hand for the loop to be executed. @variables:

Why is Font Awesome only showing a square?

为君一笑 提交于 2019-12-11 20:16:23
问题 I am trying to replicate the page linked from Start Bootstrap. All goes fine with the exception of the font-awesome.min.css images. I am using the same version of font-awesome.min.css and the same code. My code contains the following, which is taken directly from the page's source code: <i class="fa fa-fw fa-check"></i> <i class="fa fa-fw fa-gift"></i> <i class="fa fa-fw fa-compass"></i> These images are supposed to be shown under the "Welcome to Modern Business" as a checkmark, gift, and