兩個input標簽之間間隙問題的解決


 <input type="text">
 <input type="button" value="搜索">

  代碼顯示效果:

解決方案

1、改變HTML結構,input之間不要換行

 
1  <input type="text">
2 <input type="button" value="搜索">
View Code
 
改變HTML結構清除input間隙

2、給第一個input添加左浮動

input[type="text"]{
float:left;
}
input[type="button"]{
float:left;
}
View Code

改正之后代碼效果如下:

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM