我使用这个jQuery JavaScript函数来显示状态信息状态消息,微博像使用jQuery
function topBar(message) {
$("<div />", { 'class': 'topbar', text: message }).hide().prependTo("body")
.slideDown('fast').delay(4000).slideUp(function() { $(this).remove(); });
}
和我的CSS:
.topbar {
background: #476275;
border-bottom: solid 2px #EEE;
padding: 3px 0;
text-align: center;
color: white;
font-family:Arial,Helvetica,sans-serif;
font-size:135%;
font-weight:bold;
}
我让我的状态信息,但它确实是什么在body标签中插入一个div,而不是我想要的消息显示出来的身体(z索引)完全像Twitter(即)只是从顶部流动我的消息,并隐藏它...任何建议....希望你有我的问题..
完全一样,但我想给淡出/隐藏顶部效果... – 2010-06-18 07:07:07
@Pandiya Chendur - 请参阅修正的答案 – codingbadger 2010-06-18 07:21:12