解决input之间的空隙


<!doctype html>

<html>

 <head>

  <meta charset="UTF-8">

  <meta name="Author" content="胡超">  

<title>super胡</title>

<style type="text/css">

*{ margin:0px; padding:0px; }

  #a1{     float:left;  margin-top:20px;  height:32px;  line-height:32px;  border:1px solid black;   }

  #a2{     margin-top:20px;   height:34px;   border:1px solid black;/*文本框默认使用盒模型content-box,32+1*2=34 按钮默认使用border-box 所以border不算在里面*/        

  }

</style>  

</head>

 <body>

  <input type="text"id="a1"value="aaa"/><input type="button"id="a2"value="aaa"/><!--1. 让两个input不分开在一行(之间没有空隙)也可实现没有空隙 1.若分开则让第一个<input>float:left就可以了-->  

</body>

</html>


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM