|
|
@ -56,8 +56,8 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="news-elevator">
|
|
|
|
<div class="news-elevator">
|
|
|
|
<ul class="news-elevator-list">
|
|
|
|
<ul class="news-elevator-list">
|
|
|
|
<li><a href="#"></a>新鲜好物</li>
|
|
|
|
<li><a href="#">新鲜好物</a></li>
|
|
|
|
<li><a href="#"></a>人气推荐</li>
|
|
|
|
<li><a href="#">人气推荐</a></li>
|
|
|
|
<li><a href="#">热门品牌</a></li>
|
|
|
|
<li><a href="#">热门品牌</a></li>
|
|
|
|
<li><a href="#">最新专题</a></li>
|
|
|
|
<li><a href="#">最新专题</a></li>
|
|
|
|
<li><a href="#">顶部</a></li>
|
|
|
|
<li><a href="#">顶部</a></li>
|
|
|
@ -157,7 +157,7 @@
|
|
|
|
const elevator = document.querySelector('.news-elevator')
|
|
|
|
const elevator = document.querySelector('.news-elevator')
|
|
|
|
window.addEventListener('scroll',function(){
|
|
|
|
window.addEventListener('scroll',function(){
|
|
|
|
const n = document.documentElement.scrollTop
|
|
|
|
const n = document.documentElement.scrollTop
|
|
|
|
if (n >=300){
|
|
|
|
if (n >=500){
|
|
|
|
elevator.style.opacity = 1
|
|
|
|
elevator.style.opacity = 1
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
elevator.style.opacity = 0
|
|
|
|
elevator.style.opacity = 0
|
|
|
|