Div+css 搜索框

html-css012

Div+css 搜索框,第1张

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/htmlcharset=gb2312" />

<title>无标题文档</title>

<style type="text/css">

#dv1

{margin:0px autowidth:200pxheight:80px}

#dv2

{

background:url(91529822cd5685b7d7cae2f9.jpg)

width160px height:33px

float:left

width: 174px

overflow: hidden

text-align:center

left: 459px

top: 13px

}

#dv3

{

width:34px

height:33px

float:left

position:absolute

left: 497px

top: 16px

overflow: hidden

}

</style>

</head>

<body><form id="form1" name="form1" method="post" action="">

<div id="dv1"><div id="dv2">

<label>

<input type="text" name="textfield" style="width:100pxheight:20px" />

</label>

</div><div id="dv3"><a href="#" ><img src="aaa.jpg" style="border:0px"/></a></div>

</div> </form>

</body>

</html>

你试下把

不好意思刚弄错了,box-shadow是吧?这个代码在chrome里可以。

<html>

 <head>

  <title>测试</title>

  <style type="text/css">

   .inputBox{

    border:3px solid rgb(247, 242, 242)

    width:350px

    height:30px

   }

   .inputBox:focus{

    border:1px solid rgb(212, 235, 247)

    box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6)

   }

   .btnBox{

    width:50px

    height:30px

    background:white

   }

  </style>

 </head>

 <body>

  <input type="text" class="inputBox">

  <input type="button" value="Go!" class="btnBox"></input>

 </body>

</html>