如何使用jquery创建一个简单的弹出式chatbox,并粘贴在页面的右下角?就像facebook或google一样。我希望动画淡出,而不是滑动。我只需要它突然出现,没别的了。
.chat{
width:200px;
height:300px;
background:#000;
position:fixed;
bottom:0;
right:0;
}
.close{
position:absolute;
top:0;
right:0;
}
<div class="chat">
<div class="close">x</div>
some content
</div>
<a href="#" class="trigger">Click here</a>发布于 2014-04-01 11:42:35
适用于fade in和fade out。示例:
$('#element').fadeIn();
Documentation
与fadeOut()相同;
关于stick position
你可以使用CSS来做这件事。示例:
#element {
position: absolute;
bottom: 20px;
right: 20px;
z-index: 100;
}JSFiddle
https://stackoverflow.com/questions/22776052
复制相似问题