2017-06-17 57 views
-1

表單包含邊框文本在角落我堅持如何使這種佈局。我該如何創建一個這樣的表單?使用html5和css3

enter image description here

+0

尋求幫助(「問題**爲什麼不,或者如何讓這段代碼工作?**「)必須包含所需的行爲,_specific問題或錯誤和**最短代碼** _在問題本身**中重現**。沒有**明確問題陳述**的問題對其他讀者沒有用處。請參閱:[如何創建最小,完整和可驗證示例](http://stackoverflow.com/help/mcve)。 – LGSon

+0

@tejaswini sana ,,,,檢查代碼段.. –

回答

1

<b> <div style='color:darkblue'> A Simple Form </div> </b> 
 
<i> <div> form fundametals </div> </i> 
 

 
<form> 
 
<fieldset> 
 
    <legend>Customer Info:</legend> 
 
    Name: <input type="text" name="name" placeholder="Enter Your Name"><br> 
 
    Telephone: <input type="tel" name="tel" placeholder="Pattern: 1-234-567-8910" ><br> 
 
    Email Address: <input type="email" name="email" placeholder="Enter Your Email Address"> 
 
</fieldset> 
 
    
 
    
 
<fieldset> 
 
    <legend> Book:</legend> 
 
    <input type="text"> Quantity (Maximum 5) <input type="number" name="quantity" max="5"> <br> 
 

 
</fieldset> 
 
    
 
<br> 
 
<input type="button" name="submit" value="Submit"> 
 
    
 
</form>

+0

我們如何獲得圓潤的邊緣? –

+0

@tejaswinisana ... ...使用

Tejaswani

+0

@tejaswinisana ......葉Dekh羅....對於實用... https://www.w3schools.com/tags/tag_legend.asp –

0

「我們怎樣才能圓邊?」

例如,通過爲「border-radius:5px」添加樣式到該元素。

+0

OK等等...我爲你更新了新的答案... –

+0

檢查片段。 .. –

0

@ DanielaB67 ...你要像這樣...

fieldset { 
 
    border: 2px solid #a1a1a1; 
 
    padding: 10px 10px; 
 
    background: #dddddd; 
 
    width: 300px; 
 
    border-radius: 25px; 
 
}
<b> <div style='color:darkblue'> A Simple Form </div> </b> 
 
<i> <div> form fundametals </div> </i> 
 

 
<form> 
 
<fieldset> 
 
    <legend>Customer Info:</legend> 
 
    Name: <input type="text" name="name" placeholder="Enter Your Name"><br> 
 
    Telephone: <input type="tel" name="tel" placeholder="Pattern: 1-234-567-8910" ><br> 
 
    Email Address: <input type="email" name="email" placeholder="Enter Your Email Address"> 
 
</fieldset> 
 
    
 
    
 
<fieldset> 
 
    <legend> Book:</legend> 
 
    <input type="text"> Quantity(Maximum 5)<br> <input type="number" name="quantity" max="5"> <br> 
 

 
</fieldset> 
 
    
 
<br> 
 
<input type="button" name="submit" value="Submit"> 
 
    
 
</form>