我想在这段代码中添加淡入效果......每次我创建新记录时,代码都会向我显示,但我想给它添加淡入效果。谢谢你。这是代码:
<?php
include("includes/db.php");
include("includes/time_stamp.php");
?>
<html>
<head>
<link rel="stylesheet" href="wtfdiary.css">
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" >
$(function() {
$("#tweet_submit").click(function()
{
var tweet = $("#tweet").val();
var dataString = 'tweet='+ tweet;
if(tweet=='')
{
alert('Please type your tweet');
}
else
{
$.ajax({
type: "POST",
url: "post_tweet.php",
data: dataString,
cache: false,
success: function(html){
$("#tweet").val('');
$("#content").prepend(html);
}
});
}return false;
}); });
</script>
</head>
<body>
<div id="container">
<div id="sidebar">
<div id='logo'><img src='includes/1.png'></div>
<form action="#" method="POST">
<div><textarea id="tweet" name="tweet" placeholder="Compose new Tweet"></textarea></div>
<input type="submit" value=" Tweet " class="btn" id="tweet_submit"/>
</form>
<div id="flash_result"></div>
</div>
<div id="main">
<div id='heading'>Tweets</div>
<div id='content'>
<?php
$sql="select * from tweets order by t_id DESC";
$result=mysql_query($sql);
while($row=mysql_fetch_row($result))
{
$time = "$row[2]";
echo "<div class='tweet_box'>";
echo "<div class='tweet_user'><img class='user_img'
src='http://www.gravatar.com/avatar/a422402df9e5dc54fab6e8131dd19fd0?s=50'></div>";
echo "<div class='tweet_body'>";
?>
<div class='tweet_time'><?php time_stamp($time);?></div>
<?php
echo "<div><b><a href='http://twitter.com/wtfdiary'>Abhishek Ahlawat</a></b> <span
class='uname'>@wtfdiary</span></div>";
echo "<div class='tweet_text'>$row[1]</div>";
echo "</div></div>";
}
?>
</div>
</div>
</div>
</body>
</html>
我想在出现时添加一些淡入效果
非常感谢你们,你们摇滚!