CSS 如何将搜索按钮做到框里?

html-css06

CSS 如何将搜索按钮做到框里?,第1张

你好!布局建议使用div里边放input和button的方式

<div style="border:1px solid #ccccccwidth:150pxheight:25px">

<input type="text" style="border:0margin-left:5pxwidth:110pxheight:25pxline-height:25px" />

<input type="button" value="" style="background:url(searchBtn.gif) no-repeat center centerwidth:15pxheight:15pxmargin:5px" />

</div>

以上为大概思路,具体数值还需根据实际情况进行调整!

<button class="btn">搜 索</button>

css:

.btn {

background: url(btn.gif) no-repeat

height: 32px

width: 80px

text-align: center

cursor: pointer

line-height: 32px

color: #FFFFFF

font-weight: bold

border:none

}