Jquery中文网 www.jquerycn.cn
Jquery中文网 >  jQuery  >  jquery 教程  >  正文 JQUERY实现左侧TIPS滑进滑出效果示例

JQUERY实现左侧TIPS滑进滑出效果示例

发布时间:2014-02-01   编辑:www.jquerycn.cn
左侧提示滑进滑出的平滑效果使用jQuery实现,具体代码及截图如下,感兴趣的朋友可以参考下哈,希望对大家学习jquery有所帮助
左侧提示 滑进滑出 平滑效果,各位童鞋如果遇到类似效果可以应用:
 
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);
});

HTML:
复制代码 代码如下:

<!--左侧浮动-->
<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>

CSS:
复制代码 代码如下:

.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>

您可能感兴趣的文章:
JQUERY实现左侧TIPS滑进滑出效果示例
40个有创意的jQuery图片、内容滑动及弹出插件收藏集之一
40个有创意的jQuery图片和内容滑动及弹出插件收藏集之三
40个有创意的jQuery图片和内容滑动及弹出插件收藏集之二
jQuery图片播放器 imgplayer
jQuery幻灯片放映插件 CrossSlide
Jquery 滑入滑出效果实现代码
jquery必须知道的一些常用特效方法及使用示例(整理)
网页标题随机显示名言js代码
HTML5单页面手势滑屏切换原理分析

关键词: 滑进  滑出  JQUERY   
[关闭]