亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

jQuery實(shí)現(xiàn)點(diǎn)擊圖標(biāo)div循環(huán)放大縮小功能

 更新時(shí)間:2018年09月30日 10:28:03   投稿:mrr  
這篇文章主要介紹了jQuery實(shí)現(xiàn)點(diǎn)擊圖標(biāo)div循環(huán)放大縮小功能,這是一個(gè)很常見(jiàn)很基礎(chǔ)的功能,下面小編通過(guò)實(shí)例代碼給大家介紹,需要的朋友可以參考下

很基礎(chǔ)的一個(gè)功能,點(diǎn)擊左下角的圖標(biāo)按鈕,地圖的整個(gè)div會(huì)變大,變大預(yù)覽之后,再次點(diǎn)擊圖標(biāo)按鈕,地圖的整個(gè)div會(huì)變小,恢復(fù)原樣,兩個(gè)圖標(biāo)在地圖界面的放大和縮小時(shí)間不斷的切換圖標(biāo)狀態(tài)(箭頭向里面,或者箭頭向外面)


圖片.png


圖片.png

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title></title>
    <script src="http://code.jquery.com/jquery-1.8.0.min.js"></script>
    <style>
      #scale {
        background: #FFFFFF url('../img/suo.png') no-repeat scroll 0px 0px;
        background-position: center center;
        position: absolute;
        left: 3%;
        bottom: 40%;
        width: 26px;
        height: 26px;
      }
      #scale.current {
        background: #FFFFFF url("../img/fang.png") no-repeat scroll 0px 0px;
        background-position: center center;
      }
      #updmap {
        border: 1px solid #1E90FF;
        width: 400px;
        height: 200px
      }
    </style>
  </head>
  <body>
    <div id="scale" style=""></div>
    <div id="updmap">
    </div>
  </body>
  <script>
    $("#scale").toggle(function() {
      $(this).toggleClass("current");
      $("#updmap").css({
        "width": "950px",
        "height": "400px",
      });
    }, function() {
      $(this).toggleClass("current");
      $("#updmap").css({
        "width": "400px",
        "height": "200px",
      });
    });
  </script>
</html>

總結(jié)

以上所述是小編給大家介紹的jQuery實(shí)現(xiàn)點(diǎn)擊圖標(biāo)div循環(huán)放大縮小功能,希望對(duì)大家有所幫助,如果大家有任何疑問(wèn)請(qǐng)給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)腳本之家網(wǎng)站的支持!

相關(guān)文章

最新評(píng)論