there is such a requirement:
< div id= "demo" > < / div >
page enters, then disappears after 5 seconds, appears after an interval of 8 seconds, and disappears again after 5 seconds, repeating this process.
my idea is this:
setInterval(function(){
$("-sharpdemo").css("display","block")
setTimeout(function(){
$("-sharpdemo").css("display","none");
},5000);
}, 8000);
but there seems to be a problem with time. What caused it?