Font awesome using font face - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Font awesome

Description

Font awesome using font face

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
@font-face {
   font-family:"FontAwesome";
   font-weight:normal;
   font-style:normal;
   src:url('https://www.java2s.com/style/demo/Google-Chrome.png');
   src:url('https://www.java2s.com/style/demo/Google-Chrome.png') format("embedded-opentype"),
   url('https://www.java2s.com/style/demo/Google-Chrome.png') format("woff3"),
   url('https://www.java2s.com/style/demo/Google-Chrome.png') format("woff"),
   url('https://www.java2s.com/style/demo/Google-Chrome.png') format("truetype"),
   url('https://www.java2s.com/style/demo/Google-Chrome.png') format("svg");
}

.myClass:before {<!--from w  w w  .  j  a v a2s.co m-->
   font-family:FontAwesome;
   content:"\f25";
}
</style> 
 </head> 
 <body> 
  <a class="myClass" href="#">Lorem ipsum do</a>  
 </body>
</html>

Related Tutorials