2015-04-01 38 views
0

我試圖創建一個類似於此的表單。 但我發現很難顯示與表單元素內聯的文本。如何在文本之間添加內聯輸入元素

表格將如下所示: 我證明受益所有人是____的居民,屬於美國與該國之間的所得稅條約的含義_______一些文字在這裏。 (我要放置就位點的文本字段)

+0

爲什麼你覺得它很難?輸入字段默認是內聯元素,所以你應該能夠將它們插入到你的文本中。 – Lee 2015-04-01 11:37:05

+0

你能提供樣例代碼嗎? – 2015-04-01 11:37:25

回答

0
<p> I certify that the beneficial owner is a resident of <input type="text" /> </p> 

放一個P(段)標籤內的一切。

複製並粘貼代碼。

0

這樣的事情?

body { 
 
    line-height: 1.5em; 
 
} 
 

 
input { 
 
    outline:none; 
 
    border:0; 
 
    border-bottom: 1px solid; 
 
    max-width: 80px; 
 
}
<form> 
 
    I certify that <input type="text"> within the meaning of the income tax treaty between the United States and that country <input type="text"> 
 
</form>

注意,除非指定爲否則<input>元件是內聯元素。

+0

Thanks..it's done – 2015-04-01 11:41:36

0

檢查這個!這是你需要的嗎?

<form> 
    <p>  
     Form will be something like this: I certify that the beneficial owner is a resident of <input type="text"></input> within the meaning of the income tax treaty between the United States and that country <input type="text"></input>. 
    </p> 
</form> 
相關問題