请问js如何实现网页下拉顶部导航条如何悬浮固定在顶部?
网友回复
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
.header {
position: fixed;
top: 0;
left: 0;
width: 100%;
background: #cc5350;
color:#fff;
z-index: 1000;
height: 200px;
overflow: hidden;
-webkit-transition: height 0.3s;
-moz-transition: height 0.3s;
transition: height 0.3s;
text-align:center;
line-height:160px;
}
.header.shrink {
height: 100px;
line-height:80px;
}
.header h1
{
font-size:30px;
font-weight:normal;
...点击查看剩余70%


