font-awesome

how to use font awesome in own css?

你说的曾经没有我的故事 提交于 2019-12-04 16:59:23
问题 I'm using bootstrap and Font Awesome. In a custom css class I'm working on I tried to include Font Awesome icons instead of using images. Here is my code before Font Awesome. .data .close { display: block; float: right; width: 30px; height: 30px; background: url(../img/close.png) top right no-repeat; text-align: right; outline: none; filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=70); opacity: 0.7; } .next { right: 0; float: right; } .next:hover { background: url(../img/next.png)

How to embed font-awesome icons into submit_tag

♀尐吖头ヾ 提交于 2019-12-04 16:01:22
问题 Trying to user font awesome icons for my buttons but I cant get it to show in the submit_tag <%= submit_tag icon("search"), class: "btn-primary", style:"width:40px;" %> output: <input class="btn-primary" name="commit" style="width:40px;" type="submit" value="<i class='icon-search' style='font-size:1em' ></i>"> helper: def icon(name, size=1) #icon("camera-retro") #<i class="icon-camera-retro"></i> html = "<i class='icon-#{name}' " html += "style='font-size:#{size}em' " html += "></i>" html

Why doesn't Font Awesome work in my Shadow DOM?

非 Y 不嫁゛ 提交于 2019-12-04 15:39:33
Font Awesome is not working in my shadow DOM since I have the following in it to prevent styles from leaking in and out: :host { all: initial; /* 1st rule so subsequent properties are reset. */ display: block; contain: content; /* Boom. CSS containment FTW. */ } I'm able to use other stylesheets by just inlining them within the :host property, but that doesn't work with Font Awesome since it uses relative paths in its stylesheet. I found this post and tried it with the scoped CSS I implement, but the icons show as squares, as can be seen in my example . I had the same issue with StencilJS.

Font awesome icon font as a placeholder in input after adding class with jquery

左心房为你撑大大i 提交于 2019-12-04 14:23:16
I am trying to use font-awesome icons as a placeholder in search input field. Jsfiddle examples I use corresponding html entity as a placeholder, then use pseudo class to style placeholder with correct font-family (example 2 in jsfiddle): HTML: <div class="wrapper"> <input class="icon" type="text" placeholder="" /> </div> CSS: .wrapper { font-family:'arial', sans-serif; } input.icon { padding:5px; } input.icon::-webkit-input-placeholder { font-family:'FontAwesome'; } input.icon::-moz-placeholder { font-family:'FontAwesome'; } input.icon::-ms-input-placeholder { font-family:'FontAwesome'; } It

Change FontAwesome icon with text on hover

跟風遠走 提交于 2019-12-04 14:01:14
I'm trying to create a responsive feature to my website. Basicly what I want is to have font awesome icons for navigation, but when on computer if you hover the mouse over the icon, it changes into a word. I've tried it via CSS, using a:content:"" and then a:hover:content:"" I have never tried something like this before and I'd appreciate it if anybody could point out what I have to do to get it working. Here's a JSFiddle i { color: #fff; } i { padding: 0 10px; } ul { list-style-type: none; } .nav ul { margin: 0; padding: 0; position: absolute; top: 0; right: 0; font-size: 0px; } .nav ul li {

Bootstrap and font-awesome in MVC4

巧了我就是萌 提交于 2019-12-04 12:02:44
问题 I am using MVC4 and have added Bootstrap and Font Awesome via nuget. I can see how Bootstrap gets bundled in via BootstrapBundleConfig.cs (which was added by the nuget package) below: public static void RegisterBundles() { BundleTable.Bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include("~/Scripts/bootstrap*")); BundleTable.Bundles.Add(new StyleBundle("~/Content/bootstrap").Include("~/Content/bootstrap.css", "~/Content/bootstrap-responsive.css")); } I have the following questions: For

Font Awesome icon as marker in Google Maps API V3

孤街醉人 提交于 2019-12-04 10:46:58
I want to use a font awesome icon as Google Maps marker. Here is my code: function addMarker(marker) { marker1 = new google.maps.Marker({ position: new google.maps.LatLng(obj.geo_lat,obj.geo_lng), category: obj.status, map: map, icon: // Font Awesome icon here }); I've looked at this question, but unfortunately this is not working properly for me. I was wondering if there's another way to do this. disprog Yes, there is. You can use RichMarker Example: function addMarker(marker) { marker1 = new RichMarker({ position: new google.maps.LatLng(obj.geo_lat,obj.geo_lng), category: obj.status, map:

Font-Awesome css not working locally

微笑、不失礼 提交于 2019-12-04 10:38:16
问题 I would like to use Font Awesome locally without using the cdn. My code fails to add font awesome icons to my page. I can make it work easily using the cdn link but the local link fails to do anything. Thanks Jason. <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content=""> <meta name="author" content=""> <title>How it Works |

Can't load font-awesome with Webpack [duplicate]

安稳与你 提交于 2019-12-04 09:19:21
This question already has an answer here: How to configure webpack to load glyphicons/font-awesome icons in React 1 answer Trying to load font-awesome with webpack gives me this error: ERROR in ./~/font-awesome/fonts/fontawesome-webfont.eot?v=4.6.3 Module parse failed: ...\node_modules\font-awesome\fonts\fontawesome-webfont.eot?v=4.6.3 Unexpected character '�' (1:0) You may need an appropriate loader to handle this file type. I'm trying to import font-awesome in a React component like this: import "font-awesome/scss/font-awesome.scss"; Here's what my webpack.config.js looks like. I wanted to

ng-cli 6 and font awesome icons not working

这一生的挚爱 提交于 2019-12-04 08:25:31
I am using font-awesome 4.70, angular 6.0.8, and cli 6.0.8(full versioning below) I am trying to replace our existing webpack process with the cli's "ng build". I have run into an issue with font awesome's icons not showing up. I have seen similar issues in the past with older versions but I havent found a solution yet. I have the fonts hooked up in my assets assets:[ "./node_modules/font-awesome/fonts", //other assets ] And I am including the css in the styles portion of my angula.json styles:[ "./node_modules/font-awesome/css/font-awesome.css", //other styles ] I am not using "ng serve", I