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.

234 lines
6.3 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!DOCTYPE html>
<html lang="en">
<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>
</head>
<body>
<div id="main">
<div id="pageProcess"></div>
<div id="header">
<div id="logo">
<img style="height: 40px; width: 40px;" src="../图片/view2.jpg" alt="">
<p style="font-size: 18px;font-weight: bold;margin-left: 5px;">web新闻网站</p>
</div>
<div id="headerTab">
<div class="tabItem" onclick="window.location.href='home.html'">
首页
</div>
<div class="tabItem" onclick="window.location.href='newCategory.html'">
新闻分类
</div>
<div class="tabItem" onclick="window.location.href='report.html'">
专题报道
</div>
<div class="tabItem" onclick="window.location.href='news.html'">
新闻资讯
</div>
<div class="tabItem" onclick="window.location.href='cheat.html'">
互动交流
</div>
</div>
</div>
<div id="middle">
<div class="avtar">
<img src="../图片/test1.png" alt="">
<p style="font-size: 19px;font-weight: bold;">无敌暴龙战士</p>
<p class="info"><span>点赞1003</span><span>评论1213</span><span>转发1239</span></p>
</div>
<div class="weCheat">
<div class="left">
<div class="cheatTitle">
<div class="line"></div>
<div style="font-size: 20px;font-weight: bold; color: #29b6f6;margin: 0px 10px;">留言板</div>
<div class="line"></div>
</div>
<input type="text">
<button style="width: 90px;height: 40px;font-size: 14px;font-weight: bold;color: #fff;background-color:#29b6f6; position: relative; right: -600px;border: none;top: 10px;">提交留言</button>
</div>
<div class="right">
<div style="font-size: 20px;color: #29b6f6; font-weight: bold;">我的留言</div>
<div></div>
</div>
</div>
<div class="cheatContent">
<p class="contentTitle">互动内容</p>
<div class="contentItem">
<div class="itemAvtar">
</div>
<div class="itemContent">
</div>
<div class="handle">
<button>点赞</button>
<button>收藏</button>
<button>转发</button>
</div>
</div>
</div>
</div>
<div id="footer">
web新闻网站
</div>
<div id="returnTop"></div>
</div>
</body>
<style>
*{
margin: 0;
padding: 0;
color: #000;
}
#main{
display: flex;
flex-direction: column;
align-items: center;
}
#header{
width: 980px;
height: 65px;
display: flex;
flex-direction: row;
justify-content: space-between;
box-shadow: 4px 4px 7px gray;
position: fixed;
top: 0;
background-color: #fff;
}
#logo{
display: flex;
flex-direction: row;
align-items: center;
margin-left: 5px;
}
#headerTab{
display: flex;
flex-direction: row;
justify-content: space-around;
font-size: 18px;
font-weight: bold;
}
#middle{
width: 980px;
margin-top: 75px;
}
#footer{
height: 100px;
width: 100%;
background-color:#3fa8ea;
text-align: center;
font-size: 18px;
line-height: 100px;
}
#pageProcess{
height: 3px;
width: 0vw;
background-color:cornflowerblue;
position: fixed;
top: 0px;
left: 0px;
}
.tabItem{
text-align: center;
line-height: 65px;
height: 63px;
width: 150px;
transition: all;
}
.tabItem:hover{
color:#0091ea;
border-bottom: 3px solid #0091ea;
}
#returnTop{
position: fixed;
bottom: 100px;
right: 100px;
width: 20px;
height: 20px;
border-radius: 50%;
background-color: #999;
text-align: center;
line-height: 20px;
display: none;
}
.avtar{
display: flex;
flex-direction: column;
align-items: center;
}
.avtar img{
width: 60px;
height: 50px;
}
.info span{
margin: 0px 3px;
}
.weCheat{
display: flex;
flex-direction: row;
justify-content: space-between;
}
.cheatTitle{
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}
.left{
display: flex;
flex-direction: column;
width: 700px;
}
.line{
width: 300px;
height: 2px;
background-color:#29b6f6;
}
.left input{
width: 685px;
height: 230px;
}
.right{
width: 200px;
}
</style>
<script src="../jquery-3.7.1.min.js"></script>
<script>
let pageProcess = $("#pageProcess")
let returnTop = $("#returnTop")
$(window).scroll(function(){
let scrollTop = $(this).scrollTop()
let docHight = $(document).height()
let winHight = $(window).height()
let w = (scrollTop)/(docHight-winHight) *100
pageProcess.width(w+"vw")
if(scrollTop>40){
returnTop.show()
}else{
returnTop.hide()
}
})
returnTop.click(function(){
$(window).scrollTop(0)
})
</script></html>