2016-04-05 119 views
0

Iam張貼我的結果的屏幕截圖與代碼和截圖與我試圖做的結果。我試圖將圖標嵌入佔位符,但它似乎不起作用。Bootstrap聯繫表7

<div class="row"> 
<div class="col-md-6 col-sm-12"> 
    <label>Name</label> 
    <div class="form-field"> 
     <i class="fa fa-user"></i> 
     [text* name placeholder "Enter your name"] 
    </div> 
</div> 
<div class="col-md-6 col-sm-12"> 
    <label>E-Mail</label> 
    <div class="form-field"> 
     <i class="fa fa-envelope-o"></i> 
     [email* email-78 placeholder "Enter your email"] 
    </div> 
</div> 
</div> 
<div class="row"> 
    <div class="col-md-6 col-sm-12"> 
     <label>Telephone <span style="color:#aaa">(Optional)</span></label> 
     <div class="form-field"> 
      <i class="fa fa-phone"></i> 
      [text text-74 placeholder "Enter your phone"] 
     </div> 
    </div> 
    <div class="col-md-6 col-sm-12"> 
     <label>Website <span style="color:#aaa">(Optional)</span></label> 
     <div class="form-field"> 
      <i class="fa fa-globe"></i> 
      [text text-985 placeholder "Enter your website"] 
     </div> 
    </div> 
</div> 
<div class="row"> 
    <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12"> 
     <label>Message</label> 
     <div class="form-field"> 
      <i class="fa fa-pencil-square-o"></i> 
      [textarea textarea-197 placeholder "Enter your message"] 
     </div> 
    </div> 
</div> 
<div class="row"> 
    <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12"> 
     [submit class:btn class:btn-default "SEND YOUR MESSAGE"] 
    </div> 
</div> 

我的結果是:My results

我想做到這一點:I want to accomplished

謝謝

+1

http://stackoverflow.com/questions/ 18838964/add-bootstrap-glyphicon-to-input-box – Ijaz

回答

0

查找下面的例子,它可以幫助你。

HTML

<input type="text" class="form-control iconDsp" placeholder="&#xf007;"/> 

CSS 在下面的代碼.iconDsp類將連接FontAwesome字體家庭來顯示圖標

input.iconDsp{ 
    font-family: FontAwesome; 
    font-style: normal; 
    font-weight: normal; 
    text-decoration: inherit; 
} 
+0

我想將它與我的Contact Form 7插件 –

+0

結合起來嗎?你能提供一些你創建的小提琴嗎?我可以幫你的帽子。 –

+0

你是什麼意思小提琴?我的代碼是關於主題..?你能向我解釋一下你的意思嗎? –