我使用這個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