<head>
<meta charset="UTF-8">
<title>Title</title>
<link href="style.css" rel="stylesheet" type="text/css"/>
<script src="js/setHomeSetFav.js" type="text/javascript" charset="gb2312"></script>
<script type="text/javascript" src="js/myfocus-2.0.1.min.js"></script>
<script src="js/mf-pattern/mF_YSlider.js" type="text/javascript"></script>
<link href="js/mf-pattern/mF_YSlider.css" rel="stylesheet" type="text/css">
</head>
我的解决步骤,希望可以帮到你:
1).ad中 height调到320px
2)拷贝源码,直接将其余部分删除。我觉得应该是css文件中的问题
*{
margin: 0;
padding: 0;
font-size: 12px;
}
body{
background-color: #F5F5F5;
}
.top{
width: 100%;
height: 27px;
background: url("images/top_bg.jpg") repeat-x;
}
.top_content{
width: 1000px;
margin: 0 auto;
}
.top_content li{
list-style-image: url("images/li_bg.gif");
float: right;
width: 70px;
line-height: 27px;
}
.top_content a:link,.top_content a:visited{
color: #8E8E8E;
text-decoration: none;
}
.top_content a:hover,.top_content a:active{
color:red;
text-decoration: none;
}
.wrap{
width: 1000px;
margin: 0 auto;
}
.logo{
height: 80px;
background-color:#FFF;
}
.logo_left{
width: 200px;
float: left;
}
.logo_right{
width: 300px;
float: right;
height: 28px;
margin-top: 30px;
color: #8E8E8E;
}
.logo_right img{
vertical-align: middle;
margin-right: 10px;
}
.tel{
font-family: Arial;
font-size: 16px;
color: red;
}
.nav{
height: 40px;
}
.nav_left{
width: 10px;
background:url("images/nav_left.jpg") no-repeat;
}
.nav_mid{
width: 980px;
background: url("images/nav_bg.jpg") repeat-x;
}
.nav_right{
width: 10px;
background: url("images/nav_right.jpg") no-repeat;
}
.nav_left,.nav_mid,.nav_right{
float: left;
height: 40px;
}
.nav_mid_left,.nav_mid_right{
float: left;
}
.nav_mid_left{
width: 680px;
}
.nav_mid_right{
width: 300px;
}
.nav_mid_left li{
float:left;
list-style-type: none;
width: 100px;
text-align: center;
line-height: 40px;
}
.nav_mid_left a:link,.nav_mid_left a:visited{
text-decoration: none;
color: #FFF;
font-size: 16px;
font-family: Arial;
}
.nav_mid_left a:hover,.nav_mid_left a:active{
text-decoration: none;
color:red;
font-size: 16px;
/*font-family: Arial;*/
}
.search_text{
width: 190px;
height: 25px;
margin-top: 5px;
/*background: url("images/search.jpg") no-repeat right center;*/
background-color:#FFFFFF;
padding-right: 25px;
border:1px solid #FFF;
}
.ad{
height: 310px;
overflow:hidden;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<link href="style.css" rel="stylesheet" type="text/css"/>
<script src="js/setHomeSetFav.js" type="text/javascript" charset="gb2312"></script>
<script src="js/myfocus-2.0.1.min.js" type="text/javascript"></script>
<script src="js/mf-pattern/mF_YSlider.js" type="text/javascript"></script>
<link href="js/mf-pattern/mF_YSlider.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class="top">
<div class="top_content">
<ul>
<li><a href="#">联系我们</a> </li>
<li><a href="#">加入收藏</a></li>
<li><a href="#">设为首页</a></li>
</ul>
</div>
<!--top_content结束-->
</div>
<!--top结束-->
<div class="wrap">
<div class="logo">
<div class="logo_left">
<img src="images/logo.jpg" alt="京东网"/>
</div>
<!--logo_left结束-->
<div class="logo_right">
<img src="images/tel.jpg" alt="服务热线"/>24小时服务热线:<span class="tel">123-456-789</span>
</div>
<!--logo_right结束-->
</div>
<!--logo结束-->
<div clas="nav">
<div class="nav_left"></div>
<!--nav_left结束-->
<div class="nav_mid">
<div class="nav_mid_left">
<ul>
<li><a href="#">12345</a> </li>
<li><a href="#">12345</a> </li>
<li><a href="#">12345</a> </li>
<li><a href="#">12345</a> </li>
<li><a href="#">12345</a> </li>
<li><a href="#">12345</a> </li>
</ul>
</div>
<!--nav_mid_left结束-->
<div class="nav_mid_right">
<form action="" method="post">
<input type="text" class="search_text">
</form>
</div>
<!--nav_mid_right结束-->
</div>
<!--nav_mid结束-->
<div class="nav_right"></div>
<!--nav_right结束-->
</div>
<!--nav结束-->
<div class="ad">
<div id="boxID"><!--焦点图盒子-->
<div class="loading"><img src="images/loading.gif" alt="请稍候..." /></div>
<!--载入画面(可删除)-->
<div class="pic"><!--内容列表(li数目可随意增减)-->
<ul>
<li><a href="#"><img src="images/ad2.jpg" thumb="" alt="" text="详细描述2" /></a></li>
<li><a href="#"><img src="images/ad3.jpg" thumb="" alt="" text="详细描述3" /></a></li>
<li><a href="#"><img src="images/ad4.jpg" thumb="" alt="" text="详细描述4" /></a></li>
<li><a href="#"><img src="images/ad3.jpg" thumb="" alt="" text="详细描述5" /></a></li>
</ul>
</div>
</div>
</div>
</div>
<!--wrap结束-->
</body>
</html>