JQUERY實(shí)現(xiàn)左側(cè)TIPS滑進(jìn)滑出效果示例
更新時(shí)間:2013年06月27日 18:04:31 作者:
左側(cè)提示滑進(jìn)滑出的平滑效果使用jQuery實(shí)現(xiàn),具體代碼及截圖如下,感興趣的朋友可以參考下哈,希望對(duì)大家學(xué)習(xí)jquery有所幫助
左側(cè)提示 滑進(jìn)滑出 平滑效果,各位童鞋如果遇到類(lèi)似效果可以應(yīng)用:
JQUERY代碼:
//左側(cè)浮動(dòng)
$(".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:
<!--左側(cè)浮動(dòng)-->
<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 >您可以訂閱生意街商機(jī)話題,您會(huì)通過(guò)郵箱收到欄目最新內(nèi)容。</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代碼:
復(fù)制代碼 代碼如下:
//左側(cè)浮動(dòng)
$(".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:
復(fù)制代碼 代碼如下:
<!--左側(cè)浮動(dòng)-->
<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 >您可以訂閱生意街商機(jī)話題,您會(huì)通過(guò)郵箱收到欄目最新內(nèi)容。</p>
<p class="read_btn"><a href="#" target="_blank" ><img src="../css.87504.cn/images/business/read02.gif" /></a></p>
</div>
CSS:
復(fù)制代碼 代碼如下:
.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>
您可能感興趣的文章:
- 原生js和jquery實(shí)現(xiàn)圖片輪播淡入淡出效果
- jQuery 淡入淡出、展開(kāi)收縮菜單實(shí)現(xiàn)代碼
- jquery實(shí)現(xiàn)通用版鼠標(biāo)經(jīng)過(guò)淡入淡出效果
- 基于jquery實(shí)現(xiàn)的文字淡入淡出效果
- 基于jQuery實(shí)現(xiàn)淡入淡出效果輪播圖
- 完美兼容各大瀏覽器的jQuery仿新浪圖文淡入淡出間歇滾動(dòng)特效
- jQuery實(shí)現(xiàn)圖片文字淡入淡出效果
- Jquery 滑入滑出效果實(shí)現(xiàn)代碼
- jQuery實(shí)現(xiàn)向下滑出的平滑下拉菜單效果
- jQuery實(shí)現(xiàn)的淡入淡出與滑入滑出效果示例
相關(guān)文章
Jquery ajax 同步阻塞引起的UI線程阻塞問(wèn)題
這篇文章主要介紹了Jquery ajax 同步阻塞引起的UI線程阻塞問(wèn)題的相關(guān)資料,需要的朋友可以參考下2015-11-11jQuery實(shí)現(xiàn)列表自動(dòng)滾動(dòng)循環(huán)滾動(dòng)展示新聞
jQuery實(shí)現(xiàn)列表自動(dòng)滾動(dòng)循環(huán)滾動(dòng)展示新聞,鼠標(biāo)懸停時(shí)停止?jié)L動(dòng)并提示,離開(kāi)后,繼續(xù)滾動(dòng),實(shí)現(xiàn)的代碼如下,需要的朋友可以看看2014-08-08jQuery中setTimeout的幾種使用方法小結(jié)
jQuery 中 setTimeout/setInterval 不能像在原生態(tài) javascript 中那樣使用, 否則會(huì)報(bào)錯(cuò).2013-04-04jQuery實(shí)現(xiàn)動(dòng)態(tài)添加和刪除input框代碼實(shí)例
這篇文章主要介紹了jQuery實(shí)現(xiàn)動(dòng)態(tài)添加和刪除input框,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧2019-03-03點(diǎn)擊彈出層外區(qū)域關(guān)閉彈出層jquery特效示例
擊彈出層 ,點(diǎn)擊彈出層外區(qū)域關(guān)閉彈出層,點(diǎn)擊關(guān)閉關(guān)閉彈出層jquery特效,具體代碼如下,喜歡的朋友可以學(xué)習(xí)下2013-08-08jQuery源碼分析-04 選擇器-Sizzle-工作原理分析
在分析Sizzle源碼之前,先整理一下選擇器的工作原理,先明確一些選擇器中用到的名詞,后邊閱讀時(shí)不會(huì)有歧義2011-11-11基于jQuery的投票系統(tǒng)顯示結(jié)果插件
投票系統(tǒng)是網(wǎng)站中十分常見(jiàn)的系統(tǒng),顯示結(jié)果也是十分常見(jiàn)的。最近因?yàn)轫?xiàng)目需要開(kāi)發(fā)了一個(gè)投票結(jié)果顯示jQuery插件。2011-08-08