jquery實現的下拉和收縮效果樣本,jquery樣本

來源:互聯網
上載者:User

jquery實現的下拉和收縮效果樣本,jquery樣本

下拉和收縮類似的效果應用非常的頻繁,本章節簡單介紹一下如何?此效果。
代碼執行個體如下:

<!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">點擊查看效果</a> </p> </body> </html>

以上代碼實現了下拉和收縮效果,代碼比較簡單,這裡就不多介紹了。


Jquery怎製作下拉效果

$('#觸發元素').hover(function(){
$('#框框').slideDown(); //展開(動畫效果)
},function(){
$('#框框').slideUp(); //收合(動畫效果)

})
 
怎用jquery實現一個介面多個下拉式功能表的效果

這個只是form裡的select功能吧,需要jquery嗎?
自訂樣式參考:www.sd131.com/?p=1085
 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.