设置完绝对定位后logo跑到搜索框上面去了,这是为毛?
设置完绝对定位后logo跑到搜索框上面去了,这是为毛?
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>bing search</title>
<style>
body{
background:#333;
}
.bg{
background:url(image/river.jpg);
width:1366px;
height:768px;
margin:0 auto;
}
.logo{
background:url(image/logo.png);
width:107px;
height:53px;
margin:-4px 18px 0 0;
float:left;
}
.search-input-text{
border:0;
float:left;
height:27px;
width:350px;
line-height:27px;
outline:none;
}
.search-input-button{
border:0;/*去掉边框的颜色*/
background:url(image/search-button.png);
width:29px;
height:29px;
float:left;
}
.form{
float:left;
padding:5px;
background-color:#fff;
}
.search-box{
position:absolute;
top:100px;
left:100px;
}
</style>
</head>
<body>
<div>
<div>
<div></div>
<form>
<input type"text"/>
<input type="submit" value=""/>
</form>
</div>
</div>
</body>
</html>