通知警报类似于stackoverflow函数 [英] Notification alert similar to how stackoverflow functions
本文介绍了通知警报类似于stackoverflow函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
stackoverflow如何创建sliderown效果来提醒用户更改?
How does stackoverflow create the slidedown effect to alert a user of a change ?
推荐答案
Stack Overflow使用 jQuery框架,其具有使用简单动画显示隐藏元素的方法,例如:
Stack Overflow uses the jQuery framework, which has a method to show a hidden element using a simple animation, something like:
$('#notification-bar').show('slow');
http://api.jquery.com/show/ (查看演示)。
它固定在页面使用CSS中的 position:fixed
:
It is fixed to the top of the page using position:fixed
in CSS:
#notification-bar {
position:fixed;
top: 0px;
left: 0px;
width: 100%;
}
这篇关于通知警报类似于stackoverflow函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文