JQUERY实现左侧TIPS滑进滑出效果示例
左侧提示 滑进滑出 平滑效果,各位童鞋如果遇到类似效果可以应用:
JQUERY代码:
代码如下:
//左侧浮动
$(".reading").hover( function(){
$(this).animate({left:"50"});
$(".read").animate({left:"0"},600);
});
$(".read_close").click( function(){
$(".read").animate({left:"-287"},600);
$(".reading").animate({left:"0"},800);
});
<!--左侧浮动-->
<div class="reading">
<a target="_blank"><img src="../css.87504.cn/images/business/read01.gif" /></a>
</div>
<div class="read">
<a target="_blank" class="read_close"><img src="../css.87504.cn/images/business/icon_close.gif" /></a>
<p >您可以订阅生意街商机话题,您会通过邮箱收到栏目最新内容。</p>
<p class="read_btn"><a href="#" target="_blank" ><img src="../css.87504.cn/images/business/read02.gif" /></a></p>
</div>
.reading{position:fixed;left:0px;bottom:30px;cursor:pointer;width:25px;height:75px;
_position:absolute;//兼容IE6
_top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight-(parseInt(this.currentStyle.marginTop,10)||0)-(parseInt(this.currentStyle.marginBottom,30)||0)));<PRE class=css name="code">//兼容IE6,距离底部30</PRE>}.read{ border:1px solid #d0d0d0;width:285px;height:100px; -moz-box-shadow:0px 1px 2px #ccc; -webkit-box-shadow:0px 1px 2px #ccc; box-shadow:0px 1px 2px #ccc;//阴影效果,CSS3background:#fff;position:fixed;left:-287px;bottom:30px;z-index:10;_position:absolute;_top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight-(parseInt(this.currentStyle.marginTop,10)||0)-(parseInt(this.currentStyle.marginBottom,30)||0)));}.read
p{font-size:14px;line-height:22px;padding:15px 0 0 16px;width:240px;}.read p.read_btn{text-align:right;padding-top:5px}.read_close{float:right;padding:2px;cursor:pointer;}<P></P>
<PRE></PRE>
<BR>
<BR>
<P></P>
<P><BR>
</P>