You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.6 KiB

4 weeks ago
<!DOCTYPE html>
<html lang="zh">
4 weeks ago
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>新闻资讯</title>
<link rel="stylesheet" href="css/newsinfo.css">
4 weeks ago
<link rel="stylesheet" href="css/common.css">
4 weeks ago
</head>
<body>
<div class="Progress">
<div class="Prostick"></div>
</div>
4 weeks ago
<div class="navbar">
<div class="navinit">
<div class="logo">web新闻网站</div>
<div class="navbtnpart">
4 weeks ago
<div class="navbtn DStyle"><a href="index.html">首页</a></div>
<div class="navbtn DStyle"><a href="newsclass.html">新闻分类</a></div>
<div class="navbtn DStyle"><a href="foucsreport.html">专题报道</a></div>
<div class="navbtn DStyle"><a href="newsinfo.html">新闻资讯</a></div>
<div class="navbtn DStyle"><a href="#">互动交流</a></div>
4 weeks ago
</div>
</div>
</div>
<div class="searchbox"></div>
<div class="searchicon"></div>
<div class="footer">web新闻网站</div>
<script>
4 weeks ago
let totalHight;
let Prostick;
document.addEventListener("DOMContentLoaded", function () {
4 weeks ago
Prostick = document.querySelector('.Prostick');
totalHight = document.body.scrollHeight - window.innerHeight;
});
window.addEventListener('scroll', function () {
let pro = (window.pageYOffset / totalHight) * 100;
Prostick.style.width = pro + '%';
})
</script>
4 weeks ago
</body>
</html>