首页 > 代码库 > 【技术】搜索框(ie6下搜索图片在input框外)

【技术】搜索框(ie6下搜索图片在input框外)

技术分享

技术分享

父级div需定宽和高:

技术分享    技术分享

<div class="ui-search-wrap">
<input type="text" class="ui-search" placeholder="请输入">
<input type="button" value="" class="ui-but">
</div>

.ui-search-wrap{
display: inline-block;
position: relative;
width: 164px;    /*定宽*/
height: 24px;    /*定高*/
}
.ui-search-wrap .ui-search{
height: 28px;
line-height: 28px;
padding: 0 10px;
border-radius: 3px;
border: 1px solid #C1C1C1;
outline: 0 none;
}
.ui-search-wrap .ui-search-over{
border: 1px solid #FF6600;
transition: 0.3s
}
.ui-search-wrap .ui-but{
border: 0 none;
width: 35px;
height: 28px;
position: absolute;
top: 1px;
right: 1px;
background: url(../images/search_btn.png) no-repeat 0 0;
cursor: pointer;
}
.ui-search-wrap .ui-but-over{
background: url(../images/search_btn.png) no-repeat 0 -29px;

}

【技术】搜索框(ie6下搜索图片在input框外)