2017-11-10 99 views
6

Nasıl fontawesome yer tutucuya koyulur.fontawesome kullanıcı yer tutucu

<div class="form-group">   
    <input class="form-control" placeholder="username" id="inputdefault" type="text" /> 
    <input class="form-control" placeholder="password" id="inputdefault" type="text" /> 
</div> 
+0

Geçici bir https://stackoverflow.com/a/36808965/2375207 – nicolallias

cevap

3

bu şekilde deneyin:

input { 
 
    padding:10px; 
 
\t font-family: FontAwesome; 
 
    
 
}
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"/> 
 
<form role="form"> 
 
    <div class="form-group"> 
 
    <input type="text" class="form-control empty" id="iconified" placeholder="&#xf2ba"> 
 
    </div> 
 
</form>

+0

Ben kutusunu sadece – Ephraim

+0

ithal etmek gerekiyor @ Efrayim sadece yazı tipinizin harika kütüphanesi olup beklenenleri eklemeniz gerekir. Burada yazı tipi harika CDN bağlantısı dahil ettik. Bu kadar. – Ephraim

+0

göstermek şey – nabanita

0

Bunu denemek olabilir:

/* add the font to the input element*/ 
 

 
input { 
 
    font: normal normal normal 14px/1 FontAwesome; 
 
    font-size: inherit; 
 
    text-rendering: auto; 
 
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> 
 
<!-- add the code of the icon in the placeholder--> 
 
<input class="form-control" placeholder="&#xF002;" id="inputdefault" type="text">

Sen kodları here

0
<input type="text" class="form-control" placeholder="&#xF002;" id="inputdefault" style="font-family:Arial, FontAwesome" /> 

bulabilir altıgen kodlarının bir listesi bulunamadı edilebilir İşte benim kodudur Font Awesome cheatsheet.