<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>加分小代码</title>
<style type="text/css">
body{background-color:#2C3437; font-family:\5FAE\8F6F\96C5\9ED1, Arial, Lucida, Verdana, Helvetica, sans-serif;}
#like{background:#F90; width:100px; height:30px; border-radius:5px; color:#fff; font-size:16px; line-height:30px; text-align:center; margin:100px auto; cursor:pointer;}
#like .oneUp{ margin-top:-2em; display:none; color:red; font-size:20px; font-weight:bold;}
</style>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script type="text/javascript">
$(function(){
$('#like').click(function(){
$('.oneUp',this).stop(true,true).show().animate({
'margin-top':"-=2em",
"opacity":"toggle"
},'slow',function(){
$(this).css("margin-top","-2em").hide('fast');
});
});
});
</script>
</head>
<body>
<div id="like">喜欢<div class="oneUp">+1</div></div>
</body>
</html>