|
|
|
@ -8,6 +8,9 @@
|
|
|
|
|
<link rel="stylesheet" href="css/newsinfo.css">
|
|
|
|
|
</head>
|
|
|
|
|
<body>
|
|
|
|
|
<div class="Progress">
|
|
|
|
|
<div class="Prostick"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="navbar">
|
|
|
|
|
<div class="navinit">
|
|
|
|
|
<div class="logo">web新闻网站</div>
|
|
|
|
@ -23,5 +26,18 @@
|
|
|
|
|
<div class="searchbox"></div>
|
|
|
|
|
<div class="searchicon"></div>
|
|
|
|
|
<div class="footer">web新闻网站</div>
|
|
|
|
|
<script>
|
|
|
|
|
document.addEventListener("DOMContentLoaded", function () {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
totalHight = document.body.scrollHeight - window.innerHeight;
|
|
|
|
|
});
|
|
|
|
|
const Prostick = document.querySelector('.Prostick')
|
|
|
|
|
window.addEventListener('scroll', function () {
|
|
|
|
|
let pro = (window.pageYOffset / totalHight) * 100;
|
|
|
|
|
Prostick.style.width = pro + '%';
|
|
|
|
|
})
|
|
|
|
|
</script>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|