<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>表单元素的一些问题</title>
<style>
input{margin:0;padding:0;} /*input的背景会随着文字移动,在ie6下面*/
.text{width:300px; height:40px; border:1px solid blue; background:url(sun.jpg) 0 center no-repeat #FFC;}
.box{width:300px; margin-top:50px; height:30px;line-height:30px; border:1px solid blue; background:url(sun.jpg) 0 center no-repeat #FFC;}
.box input{width:300px; height:30px;border:none; background:none;} /*input本身有个白色的背景*/
</style>
</head>
<body>
<input type="text" name="" class="text"/>
<div class="box">
<input type="text" name=""/>
</div>
</body>
</html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>表单元素的一些问题</title>
<style>
input{margin:0;padding:0;} /*input的背景会随着文字移动,在ie6下面*/
.text{width:300px; height:40px; border:1px solid blue; background:url(sun.jpg) 0 center no-repeat #FFC;}
.box{width:300px; margin-top:50px; height:30px;line-height:30px; border:1px solid blue; background:url(sun.jpg) 0 center no-repeat #FFC;}
.box input{width:300px; height:30px;border:none; background:none;} /*input本身有个白色的背景*/
</style>
</head>
<body>
<input type="text" name="" class="text"/>
<div class="box">
<input type="text" name=""/>
</div>
</body>
</html>