日期:2014-05-17 浏览次数:20863 次
li{
position: relative;
top: 2px;
}
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>test</title>
<style>
.mainContent{
position: absolute;
top: 10px;
left: 300px;
width: 245px;
height: 200px;
}
ul{
padding: 0;
margin: 0;
float: left;
}
li{
float: left;
list-style: none;
margin-left: 2px;
cursor: pointer;
border: 1px solid red;
/*如果还遇到楼主所说的可以用以下的试试*/
/*position: relative;*/
/*top: 2px;*/
}
li:hover{