CSS解决input在不同浏览器下高度不一致问题
作者:飞入蓝天 来源: 十二维网 人气:296 类型: 免费 价格:¥1 所属课程:web前端工程师全栈培训    
本文档有配套视频,购买本文档或加入该课程后可播放!

允许运行Flash播放器吗?如未安装,请先安装Flash Player(版本: 11.4.0)或更高版本.

主要是利用box-sizing属性,设置为border-box

样式如下:

.InputSearch {
	width:300px;
	height:28px; 	
	float:left;
	padding-left:5px;
	border-left:1px solid #666; 
	border-bottom:1px solid #666; 
	border-top:1px solid #666; 
	border-right:none;
	vertical-align:middle; 
	color:#999;
	outline:none;
	box-sizing: border-box;
}

.IconSearch {
	width:100px;
	height:28px; 
	line-height:28px; 
	float:left;
	text-align:center;
	background-color:#eef;
	outline:none;
	border:1px solid #666;
	cursor:pointer;
	box-sizing: border-box;
}

      Html代码:
   
<div>
 <input  type="text" class="InputSearch" id="titleKey"  name="titleKey" />
 <input class="IconSearch"  type="button" value="搜&nbsp;索" />           
</div> 
   效果图:
   
本文为付费文档,请购买或加入所属课程查阅全部内容!

评论

正在加载评论...
提交评论

  •  1. 使用CSS代码的空格实现中文对齐的方法 试看
  •  2. CSS解决input在不同浏览器下高度不一致问题 试看
  •  3. Ajax开发技术
十二维网, 版权所有©2005-2018
电话:15013459492 (宋生)  
Email:wave12@126.com
深圳总部:深圳市福田区八卦四路先科机电大厦6楼
网站备案:粤ICP备10018904号