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

html-css012

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>

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

<html>

<head>

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js"></script>

<script type="text/javascript">

$(document).ready(function () {

$("#search").click(function () {

$("#load").fadeIn("slow")

})

})

</script>

</head>

<body>

<div id="load" style="display: none">

<img alt="waiting..." src="images/wait.gif" />

加载中,请稍等...

</div>

<input id="search" type="button" value="查询" />

</body>

</html>

<input style="float:leftdisplay:blockmargin-bottom:10px" type="submit" name="submit1" value="销售金额查询">