mirror of
https://github.com/mumuy/data_location.git
synced 2025-12-03 03:02:10 +08:00
updated 样式调整
This commit is contained in:
parent
230687cc6a
commit
64d368fb22
22
index.html
22
index.html
@ -147,7 +147,7 @@
|
||||
</div>
|
||||
<div class="mod-fixedbar">
|
||||
<div class="bd">
|
||||
<a href="javascript:;"><img src="static/image/gotop.png" width="24" height="24"></a>
|
||||
<a class="gotop" href="javascript:;" rel="nofollow"><img src="static/image/gotop.png" width="24" height="24"></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -322,19 +322,19 @@
|
||||
})();
|
||||
|
||||
// 底部滚动
|
||||
(function () {
|
||||
(function(){
|
||||
let timer = null;
|
||||
let $gotop = document.querySelector('.mod-fixedbar a');
|
||||
$gotop.addEventListener('click', function () {
|
||||
let $gotop = document.querySelector('.mod-fixedbar .gotop');
|
||||
$gotop.addEventListener('click',function(){
|
||||
cancelAnimationFrame(timer);
|
||||
let scrollTop = document.body.scrollTop || document.documentElement.scrollTop;
|
||||
let move = scrollTop / 18;
|
||||
timer = requestAnimationFrame(function fn() {
|
||||
var oTop = document.body.scrollTop || document.documentElement.scrollTop;
|
||||
if (oTop > 0) {
|
||||
document.body.scrollTop = document.documentElement.scrollTop = oTop - move;
|
||||
let scrollTop = document.documentElement.scrollTop;
|
||||
let move = scrollTop/18;
|
||||
timer = requestAnimationFrame(function fn(){
|
||||
var oTop = document.documentElement.scrollTop;
|
||||
if(oTop > 0){
|
||||
document.documentElement.scrollTop = oTop - move;
|
||||
timer = requestAnimationFrame(fn);
|
||||
} else {
|
||||
}else{
|
||||
cancelAnimationFrame(timer);
|
||||
}
|
||||
});
|
||||
|
||||
@ -500,7 +500,6 @@ a:hover{
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
|
||||
.mod-fixedbar .bd {
|
||||
position: fixed;
|
||||
right: 20px;
|
||||
@ -514,25 +513,13 @@ a:hover{
|
||||
height: 48px;
|
||||
margin-bottom: 2px;
|
||||
background: rgba(255,255,255,0.8);
|
||||
border: 1px solid #f0f0f0;
|
||||
box-shadow: 1px 1px 6px rgba(0,0,0,0.1);
|
||||
line-height: 48px;
|
||||
text-align: center;
|
||||
}
|
||||
.mod-fixedbar .bd .popup{
|
||||
display: none;
|
||||
position: absolute;
|
||||
right: 50px;
|
||||
bottom: 0;
|
||||
z-index: 99;
|
||||
border: 1px solid #f0f0f0;
|
||||
box-shadow: 0 0 2px 0 rgba(0,0,0,0.05);
|
||||
}
|
||||
.mod-fixedbar .bd a:hover{
|
||||
background: rgba(255,255,255,0.9);
|
||||
}
|
||||
.mod-fixedbar .bd a:hover .popup{
|
||||
display: block;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1020px) {
|
||||
.header{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user