mirror of
https://github.com/mumuy/data_location.git
synced 2025-12-03 11:12: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>
|
||||||
<div class="mod-fixedbar">
|
<div class="mod-fixedbar">
|
||||||
<div class="bd">
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -322,19 +322,19 @@
|
|||||||
})();
|
})();
|
||||||
|
|
||||||
// 底部滚动
|
// 底部滚动
|
||||||
(function () {
|
(function(){
|
||||||
let timer = null;
|
let timer = null;
|
||||||
let $gotop = document.querySelector('.mod-fixedbar a');
|
let $gotop = document.querySelector('.mod-fixedbar .gotop');
|
||||||
$gotop.addEventListener('click', function () {
|
$gotop.addEventListener('click',function(){
|
||||||
cancelAnimationFrame(timer);
|
cancelAnimationFrame(timer);
|
||||||
let scrollTop = document.body.scrollTop || document.documentElement.scrollTop;
|
let scrollTop = document.documentElement.scrollTop;
|
||||||
let move = scrollTop / 18;
|
let move = scrollTop/18;
|
||||||
timer = requestAnimationFrame(function fn() {
|
timer = requestAnimationFrame(function fn(){
|
||||||
var oTop = document.body.scrollTop || document.documentElement.scrollTop;
|
var oTop = document.documentElement.scrollTop;
|
||||||
if (oTop > 0) {
|
if(oTop > 0){
|
||||||
document.body.scrollTop = document.documentElement.scrollTop = oTop - move;
|
document.documentElement.scrollTop = oTop - move;
|
||||||
timer = requestAnimationFrame(fn);
|
timer = requestAnimationFrame(fn);
|
||||||
} else {
|
}else{
|
||||||
cancelAnimationFrame(timer);
|
cancelAnimationFrame(timer);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@ -500,7 +500,6 @@ a:hover{
|
|||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.mod-fixedbar .bd {
|
.mod-fixedbar .bd {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
right: 20px;
|
right: 20px;
|
||||||
@ -514,25 +513,13 @@ a:hover{
|
|||||||
height: 48px;
|
height: 48px;
|
||||||
margin-bottom: 2px;
|
margin-bottom: 2px;
|
||||||
background: rgba(255,255,255,0.8);
|
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;
|
line-height: 48px;
|
||||||
text-align: center;
|
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{
|
.mod-fixedbar .bd a:hover{
|
||||||
background: rgba(255,255,255,0.9);
|
background: rgba(255,255,255,0.9);
|
||||||
}
|
}
|
||||||
.mod-fixedbar .bd a:hover .popup{
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (max-width: 1020px) {
|
@media screen and (max-width: 1020px) {
|
||||||
.header{
|
.header{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user