如何淡出以下内容?它也需要完全删除,不仅是 alpha 0,而且在淡出后显示:无和可见性:隐藏。
小提琴:http : //jsfiddle.net/fourroses666/ywMUx/2/
js:
<script type="text/javascript" language="javascript" src="http://code.jquery.com/jquery-1.8.2.js"></script>
<script type="text/javascript">
$('.go-away').click(function() {
$('.message').removeClass('show');
});
</script>
CSS:
<style>
.message{display:none; visibility:hidden;}
.message.show{display:block; visibility:visible;}
.go-away{float:right; cursor:pointer; cursor:hand;}
</style>
html:
<div class="message show">Pizza is nice! <div class="go-away">x</div></div>