<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>jq 回顶</title>
<script></script>
<script src="jquery-3.5.1.js"></script>
<style type="text/css">
* {
margin: 0;
padding: 0;
}
body {
height: 2000px;
background-color: #f2f2f2;
}
#scrollUp {
position: fixed;
z-index: 111;
background-color: #777;
text-decoration: none;
top: 80%;
right: 2%;
overflow: hidden;
width: 46px;
height: 46px;
opacity: .8;
display: none;
cursor: pointer;
}
#scrollUp:hover {
background-color: black;
opacity: .6;
}
#scrollUp>div {
width: 20px;
height: 20px;
border-top: 3px solid white;
border-right: 3px solid white;
transform: rotate(-45deg);
position: relative;
left: 12px;
top: 18px;
}
</style>
</head>
<body>
<div id=
HTML使用 jq 技术点击箭头方块实现回到顶部效果
最新推荐文章于 2022-12-27 08:57:55 发布