jquery實(shí)現(xiàn)的下拉和收縮效果示例
下拉和收縮類似的效果應(yīng)用非常的頻繁,本章節(jié)簡單介紹一下如何實(shí)現(xiàn)此效果。
代碼實(shí)例如下:
<!DOCTYPE html>
<html>
<head>
<meta charset=" utf-8">
<meta name="author" content="http://www.softwhy.com/" />
<head>
<title>螞蟻部落</title>
<style type="text/css">
body{
margin:0 auto;
padding:0;
width:570px;
font:75%/120% Arial, Helvetica, sans-serif;
}
a:focus{
outline:none;
}
#panel{
background:#69C7F7;
height:200px;
display:none;
}
.slide{
margin:0;
padding:0;
border-top:solid 4px #F27613;
}
.btn-slide{
background:#F27613 url(mytest/jQuery/20121225165932118.gif) no-repeat right -50px;
text-align:center;
width:144px;
height:31px;
padding:10px 10px 0 0;
margin:0 auto;
display:block;
font:bold 120%/100% Arial, Helvetica, sans-serif;
color:#fff;
text-decoration:none;
}
.active{
background-position:right 12px;
}
</style>
<script type="text/javascript" src="http://www.softwhy.com/mytest/jQuery/jquery-1.8.3.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(".btn-slide").click(function(){
$("#panel").slideToggle("slow");
$(this).toggleClass("active");
return false;
})
})
</script>
</head>
<body>
<div style="display: block;" id="panel"></div>
<p class="slide">
<a href="javascript:;" rel="external nofollow" class="btn-slide active">點(diǎn)擊查看效果</a>
</p>
</body>
</html>
以上代碼實(shí)現(xiàn)了下拉和收縮效果,代碼比較簡單,這里就不多介紹了。
- jquery實(shí)現(xiàn)滑屏大圖定時(shí)收縮為小banner圖片的廣告代碼
- jquery簡單實(shí)現(xiàn)網(wǎng)頁層的展開與收縮效果
- jQuery實(shí)現(xiàn)文本展開收縮特效
- jQuery實(shí)現(xiàn)DIV層收縮展開的方法
- jQuery實(shí)現(xiàn)可收縮展開的級(jí)聯(lián)菜單實(shí)例代碼
- jQuery圖片的展開和收縮實(shí)現(xiàn)代碼
- jQuery+CSS實(shí)現(xiàn)菜單滑動(dòng)伸展收縮(仿淘寶)
- 基于jQuery實(shí)現(xiàn)下拉收縮(展開與折疊)特效
- jQuery 淡入淡出、展開收縮菜單實(shí)現(xiàn)代碼
- jquery實(shí)現(xiàn)的Banner廣告收縮效果代碼
相關(guān)文章
jquery獲取table中的某行全部td的內(nèi)容方法
jquery獲取table中的某行全部td的內(nèi)容方法,需要的朋友可以參考一下2013-03-03
js制作的鼠標(biāo)懸浮時(shí)產(chǎn)生的下拉框效果
js制作的鼠標(biāo)懸浮時(shí)產(chǎn)生的下拉框效果,需要的朋友可以參考下2012-10-10
jquery 模擬雅虎首頁的點(diǎn)擊對(duì)話框效果
jquery模擬雅虎首頁的點(diǎn)擊對(duì)話框效果實(shí)現(xiàn)代碼,喜歡的朋友可以參考下。2010-04-04
基于jquery實(shí)現(xiàn)五星好評(píng)
這篇文章主要為大家詳細(xì)介紹了基于jquery實(shí)現(xiàn)五星好評(píng),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2017-11-11
JQuery Ajax WebService傳遞參數(shù)的簡單實(shí)例
下面小編就為大家?guī)硪黄狫Query Ajax WebService傳遞參數(shù)的簡單實(shí)例。小編覺得挺不錯(cuò)的,現(xiàn)在就分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧2016-11-11
ASP.NET jQuery 實(shí)例4(復(fù)制TextBox的文本到本地剪貼板上)
在這節(jié),我們將看到如何把多行文本框的內(nèi)容復(fù)制到剪貼板上。注意:jQuery clipboard plugin 只支持IE2012-01-01

