<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style type="text/css">
*{
margin: 0px; padding: 0px; box-sizing: border-box;
}
#menu{
width: 1300px;
height: 800px;
margin: 0 auto;
}
#head{
width: 1300px;
height: 100px;
text-align: center;
font-size: 30px;
color: red;
}
#nav{
width: 1300px;
height: 200px;
z-index:9999;
position:relative;
}
#ul1 li{
width: 325px;
height: 50px;
float: left;
display: inline;
list-style: none;
}
#ul2 li{
width: 325px;
height: 50px;
list-style: none;
text-align: center;
}
#ul1 a{
width: 100%;
margin: 0;
text-align: center;
font-size: 25px;
text-decoration: none;
display: block;
line-height: 50px;
background: gray;
}
#ul1 a:hover{
background: red;
}
#ul2 a:hover{
background: blue;
}
#ul2 a{
width: 100%;
margin: 0;
text-align: center;
font-size: 22px;
text-decoration: none;
display: block;
line-height: 40px;
background: white;
}
#ul2{
visibility: hidden;
}
#ul1 li:hover #ul2{
visibility: visible;
}
.imgBox{
width: 1300px;
height: 400px;
margin: 0 auto;
position: relative;
text-align: center;
z-index:0;
}
.box{
list-style: none;
}
.box li img{
width: 1300px;
height: 320px;
margin: 0 auto;
}
.img1{
display: block;
}
.img2,.img3,.img4{
display: none;
}
#circlebutton{
position: absolute;
bottom: 20px;
left: 500px;
text-align: center;
list-style: none;
}
#circlebutton li{
float: left;
margin-left: 20px;
}
#circlebutton li div{
width: 20px;
height: 20px;
background: #dddddd;
border-radius: 10px;
text-align: center;
vertical-align: middle;
cursor: pointer;
}
#foot{
width: 1300px;
height: 200px;
text-align: center;
background: white;
}
</style>
</head>
<body>
<div id="menu">
<div id="head">
<h1 class="logo">商丘<span>大学</span></h1>
</div>
<div id="nav">
<ul id="ul1">
<li><a href="">学院概况</a>
<ul id="ul2">
<li><a href="">学校章程</a></li>
<li><a href="">学校领导</a></li>
<li><a href="">师校园文化</a></li>
</ul>
</li>
<li><a href="">学术研究</a>
<ul id="ul2">
<li><a href="">研讨会</a></li>
<li><a href="">研学交流</a></li>
<li><a href="">科研活动</a></li>
</ul>
</li>
<li><a href="">人才培养</a>
<ul id="ul2">
<li><a href="">本科教育</a></li>
<li><a href="">硕士培养</a></li>
<li><a href="">博士培养</a></li>
</ul>
</li>
<li><a href="">登录</a></li>
</ul>
</div>
<div class="imgbox">
<ul class="box">
<li><img class="img-slide img1" src="images/1.jpg"></li>
<li><img class="img-slide img2" src="images/2.jpg"></li>
<li><img class="img-slide img3" src="images/3.jpg"></li>
<li><img class="img-slide img4" src="images/4.jpg"></li>
</ul>
</div>
<ul id="circlebutton">
<li><div class="divEle" style="background: pink;">1</div></li>
<li><div class="divEle">2</div></li>
<li><div class="divEle">3</div></li>
<li><div class="divEle">4</div></li>
<li><div class="divEle">5</div></li>
</ul>
<script>
var index=0;
var divCon=document.getElementsByClassName("divEle");//获取所有圆点
var imgEle=document.getElementsByClassName("img-slide");//获取所有图像
function autochangeImg(){
index++;
changeImg();
}
var change1=setInterval(autochangeImg,3000);
function changeImg(){
if(index>=imgEle.length){
index=0;
}
for(var i=0;i<imgEle.length;i++){
imgEle[i].style.display='none';
divCon[i].style.background="#dddddd";
}
imgEle[index].style.display='block';
divCon[index].style.background='#ff0000';
}
</script>
</div>
<div id="foot">
<div id="a">
<span>地址:河南省商丘市</span><br>
</div>
<span>网站设计制作</span>
<span>党委宣传部</span>
<br>
<span>2023 © 商丘大学 版权所有 网站:www.sqdx.com</span>
</div>
</div>
</body>
</html>