Fontawesome en un placeholder

Per afegir un icona Font Awesome en un placeholder has de:

  1. Afegir una id especifica, és aconsellable que sigui “iconified”+ l’icona que s’utiltzi
  2. Afegir un estil amb el shortcode del FontAwesome que trobareu en aquest enllaç: variables.less (L’exemple conte el icona del correu)
#iconified::-webkit-input-placeholder::before { font-family: fontAwesome; content:'\f003  '; }
#iconified::-moz-placeholder::before  { font-family: fontAwesome; content:'\f003  ';  } /* firefox 19+ */
#iconified:-ms-input-placeholder::before  { font-family: fontAwesome; content:'\f003  ';  } /* ie */
#iconified:-moz-placeholder::before  { font-family: fontAwesome; content:'\f003  ';}

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.