<style>
* {
margin: 0;
padding: 0;
}
body{
height: 3000px;
}
.header{
width: 100%;
height: 40px;
display: flex;
justify-content: center;
align-items: center;
font-size: 30px;
color: #fff;
background-color: skyblue;
transition: top .5s linear;
position: fixed;
top: -80px;
left: 0;
}
.goTop{
width: 50px;
height: 50px;
background-color: pink;
font-size: 20px;
text-align: center;
line-height: 25px;
color: #fff;
position: fixed;
bottom: 10px;
right: 10px;
display: none;
}
</style>
</head>
<body>
<div class="header">顶部通栏</div>
<div class=
JavaScript练习小案例-----回到顶部
最新推荐文章于 2024-07-29 11:53:27 发布