我只需要一些客户端代码 jQuery 或 JS,它们将在 X 秒后改变 div 样式
像 visibility : hidden;
或者 max-height : 50px;
或者切换DIV的class\id ( preferred )
最佳答案
使用 setTimeout
setTimeout(function(){
// Change the style here... If using jQuery, it turns
$('#my_divs').css({'visibility':'hidden', 'max-height':'50px'})
// or
$('#my_divs').addClass('my-custom-class');
}, x_seconds);
关于jquery - div的定时显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3673719/