我正在制作一个启动画面。单击箭头(类.fa-nagle-up
)后,启动画面消失。但是当我刷新页面时,闪屏消失了,这是display:none
.
CSS
.splashscreen{
position: absolute;
width:100%;
height:100%;
overflow:hidden;
z-index:100000;
display: flex;
flex-direction: column;
display: none;
}
JS
if (sessionStorage.getItem('splash') !== 'true') {
$('.splashscreen').show();
sessionStorage.setItem('splash','true');
}
$('.splashscreen .top .fa-angle-up').on('click',function(){
$('.splashscreen').hide();
});
如何使它在刷新后闪屏不会消失?