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)滑出 平滑效果,各位童鞋如果遇到類似效果可以應(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 淡入淡出、展開收縮菜單實(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實(shí)現(xiàn)簡(jiǎn)單的輪換出現(xiàn)效果實(shí)例
這篇文章主要介紹了jquery實(shí)現(xiàn)簡(jiǎn)單的輪換出現(xiàn)效果,涉及jquery針對(duì)圖片樣式切換效果的相關(guān)技巧,具有一定參考借鑒價(jià)值,需要的朋友可以參考下2015-07-07
jQuery通過(guò)點(diǎn)擊行來(lái)刪除HTML表格行的實(shí)現(xiàn)示例
從一個(gè)HTML表使用一些時(shí)髦的效果,只要按一下該行,改行即可被刪除,這個(gè)示例比較簡(jiǎn)單,新手朋友們可以學(xué)習(xí)下2014-09-09
jquery京東商城雙11焦點(diǎn)圖多圖廣告特效代碼分享
這篇文章主要介紹了jquery京東商城雙11焦點(diǎn)圖多圖廣告特效,一個(gè)精致的焦點(diǎn)圖會(huì)吸引用戶的注意力,讓用戶產(chǎn)生瀏覽網(wǎng)站的興趣至關(guān)重要,現(xiàn)在小編推薦給大家一款特別棒的焦點(diǎn)圖,感興趣的小伙伴可以參考下。2015-09-09
jQuery拖動(dòng)元素并對(duì)元素進(jìn)行重新排序
這篇文章主要介紹了jQuery拖動(dòng)元素并對(duì)元素進(jìn)行重新排序的實(shí)現(xiàn)方法,感興趣的小伙伴們可以參考一下2015-12-12
jQueryPad 實(shí)用的jQuery測(cè)試工具(支持IE,chrome,FF)
這個(gè)jQueryPad也是我無(wú)意中在網(wǎng)上看頁(yè)面的時(shí)候看到的,下載下來(lái)試用了下,感覺(jué)很好,這個(gè)軟件是使用WPF開發(fā)的(不過(guò)不開源,需要安裝.NET Framework 3.5),整體界面很簡(jiǎn)潔。2010-05-05
一個(gè)簡(jiǎn)單的jquery進(jìn)度條示例
這篇文章主要介紹了一個(gè)簡(jiǎn)單的jquery進(jìn)度條示例,需要的朋友可以參考下2014-04-04
jQuery中JSONP的兩種實(shí)現(xiàn)方式詳解
這篇文章主要介紹了jQuery中JSONP的兩種實(shí)現(xiàn)方式詳解的相關(guān)資料,需要的朋友可以參考下2016-09-09

