0
我想改變:後用戶向下滾動後,我的菜單上,更多的失敗後,這是我想要得到的工作:如何更改:在用戶向下滾動時進行WordPress導航之後?
腳本:
<script type="text/javascript">
var a = 50px;
var pos = $(window).scrollTop();
if(pos > a) { $('.current_page_item').addClass('transparent') }
</script>
CSS:
.nav-menu .current_page_item:after {
content: "";
display: block;
width: 0;
border: 10px solid rgba(35, 31, 32, 1);
border-color: rgba(35, 31, 32, 1) transparent transparent transparent;
position: absolute;
top: 100%;
left: 50%;
margin-left: -10px;
}
.nav-menu .current_page_item.transparent:after {
content: "";
display: block;
width: 0;
border: 10px solid rgba(35, 31, 32, 0.8);
border-color: rgba(35, 31, 32, 0.8) transparent transparent transparent;
position: absolute;
top: 100%;
left: 50%;
margin-left: -10px;
}
這是越來越接近答案或我仍然這樣做是錯誤的?
感謝您的任何意見。