原因:inline-block元素之间有如果有换行或者空格就会有间隙
解决方法:再父元素font-size:0; 即可 还有许多其他方法,自行百度吧!
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Web Dojo Code</title>
<style>
.down_banner{height: 254px;background:red url("../img/down_banner.png") no-repeat scroll center top;font-size:0;}
.down_banner p{text-align: center;display: inline-block;width: 100%;font-size: 16px;color: #ffffff;padding-bottom: 20px;padding-top: 125px;}
.down_banner form label{display: inline-block;width: 100%;text-align: center}
.down_banner form label input[type="text"]{background: #fff;width: 420px;height: 42px;line-height: 42px;
text-indent: 25px;border-top-left-radius: 5px;border-bottom-left-radius: 5px;border: 0;font-size: 16px;color: #0d36b6;}
.down_banner form label input[type="submit"]{width: 70px;background-color: #0c78ee;border-top-right-radius: 5px;border: 0;border-bottom-right-radius: 5px;
color: #fff;font-size: 18px;height: 40px;line-height: 40px;}
</style>
</head>
<body>
<div class="down_banner">
<p>
下载中心
</p>
<form action="">
<label>
<input type="text" placeholder="请输入标题或者关键字进行搜索">
<input type="submit" value="搜索">
</label>
</form>
</div>
</body>
</html>
此处不算什么稀罕事,但是我第一次发现,应该记录一下 哈哈
原文:http://www.cnblogs.com/novice-wangqi/p/6375438.html