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.

126 lines
5.7 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/foucsreport.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="mainbody">
4 weeks ago
<div class="titlebar">
4 weeks ago
<div class="title">《专题报道》</div>
<a href="#">更多>>></a>
4 weeks ago
</div>
<div class="reportbox">
<div class="boxtitle"></div>
<div class="boxcover"></div>
<div class="boxinfo"></div>
</div>
<div class="reportbox">
<div class="boxtitle"></div>
<div class="boxcover"></div>
<div class="boxinfo"></div>
</div>
<div class="reportbox">
<div class="boxtitle"></div>
<div class="boxcover"></div>
<div class="boxinfo"></div>
</div>
<div class="reportbox">
<div class="boxtitle"></div>
<div class="boxcover"></div>
<div class="boxinfo"></div>
</div>
<div class="reportbox">
<div class="boxtitle"></div>
<div class="boxcover"></div>
<div class="boxinfo"></div>
</div>
<div class="reportbox">
<div class="boxtitle"></div>
<div class="boxcover"></div>
<div class="boxinfo"></div>
</div>
</div>
<div class="footer">web新闻网站</div>
4 weeks ago
<script>
let totalHeight;
let Prostick;
document.addEventListener("DOMContentLoaded", function () {
let boxTitle = [
4 weeks ago
{ text: "排查消防安全风险隐患" },
{ text: "排查消防安全风险隐患" },
{ text: "排查消防安全风险隐患" },
{ text: "排查消防安全风险隐患" },
{ text: "排查消防安全风险隐患" },
{ text: "排查消防安全风险隐患" },
4 weeks ago
];
let boxCover = [
4 weeks ago
{ src: "pics/43401.png" },
{ src: "pics/43402.png" },
{ src: "pics/45502.png" },
{ src: "pics/47204.jpg" },
{ src: "pics/47206.jpg" },
{ src: "pics/43403.png" },
4 weeks ago
];
let boxInfo = [
4 weeks ago
{ text: "应急管理部将督促各地突出“三类场所”和高层居民楼等,全面彻底排查整治各类消防安全风险隐患,集中治理电动自行车进楼入户等突出问题。" },
{ text: "应急管理部将督促各地突出“三类场所”和高层居民楼等,全面彻底排查整治各类消防安全风险隐患,集中治理电动自行车进楼入户等突出问题。" },
{ text: "应急管理部将督促各地突出“三类场所”和高层居民楼等,全面彻底排查整治各类消防安全风险隐患,集中治理电动自行车进楼入户等突出问题。" },
{ text: "应急管理部将督促各地突出“三类场所”和高层居民楼等,全面彻底排查整治各类消防安全风险隐患,集中治理电动自行车进楼入户等突出问题。" },
{ text: "应急管理部将督促各地突出“三类场所”和高层居民楼等,全面彻底排查整治各类消防安全风险隐患,集中治理电动自行车进楼入户等突出问题。" },
{ text: "应急管理部将督促各地突出“三类场所”和高层居民楼等,全面彻底排查整治各类消防安全风险隐患,集中治理电动自行车进楼入户等突出问题。" },
4 weeks ago
];
const reportBoxes = document.querySelectorAll('.reportbox');
reportBoxes.forEach((box, index) => {
const boxTitleContent = box.querySelector('.boxtitle');
const boxCoverContent = box.querySelector('.boxcover');
const boxInfoContent = box.querySelector('.boxinfo');
const h3 = document.createElement('h3');
h3.textContent = boxTitle[index].text;
boxTitleContent.appendChild(h3);
const img = document.createElement('img');
img.src = boxCover[index].src;
boxCoverContent.appendChild(img);
const p = document.createElement('p');
p.textContent = boxInfo[index].text;
boxInfoContent.appendChild(p);
});
Prostick = document.querySelector('.Prostick');
4 weeks ago
totalHeight = document.documentElement.scrollHeight - window.innerHeight;
4 weeks ago
});
window.addEventListener('scroll', function () {
let pro = (window.pageYOffset / totalHeight) * 100;
4 weeks ago
Prostick.style.width = pro + '%';
});
</script>
4 weeks ago
</body>
</html>