欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

jQuery實現(xiàn)百度登錄框的動態(tài)切換效果

 更新時間:2017年04月21日 15:59:08   作者:web_zhuo  
這篇文章主要介紹了jQuery實現(xiàn)百度登錄框的動態(tài)切換效果,需要的朋友可以參考下

點擊右下角圖片進行狀態(tài)切換,效果圖

<!doctype html> 
<html lang="en"> 
<head> 
  <meta charset="UTF-8"> 
  <title>百度登錄框</title> 
  <style type="text/css"> 
    *{margin: 0;padding: 0;} 
    body 
    { 
      font-size: 12px; 
    } 
    a 
    { 
      text-decoration: none; 
      color: #2647CB; 
    } 
    a:hover 
    { 
      text-decoration: underline; 
      color: red; 
    } 
    .wrap 
    { 
      width: 390px; 
      height: 450px; 
      margin: 50px auto; 
      border: 1px solid #8A8989; 
      position: relative; 
    } 
    .main 
    { 
      width: 350px; 
      height: 400px; 
      margin: 0 auto; 
    } 
    .header 
    { 
      width: 100%; 
      height: 50px; 
      line-height: 50px; 
      background-image: url(images/foot.png); 
      background-color: rgb(247,247,247); 
      background-repeat: no-repeat; 
    } 
    .header h3 
    { 
      display: inline-block; 
      line-height: 50px; 
      margin-left: 50px; 
    } 
    .header span 
    { 
      display: inline-block; 
      float: right; 
      margin: auto 15px; 
      font-size: 30px; 
    } 
    .inputDiv 
    { 
      display: block; 
      width: 350px; 
      height: 40px; 
      margin: 10px auto; 
    } 
    .phoneIn 
    { 
      display: inline-block; 
      float: right; 
      font-size: 14px; 
      background-image: url(images/phone.png); 
      background-repeat: no-repeat; 
      padding-left: 20px; 
      margin: 30px 0px 10px 0px; 
    } 
    .smBtn 
    { 
      background: #2066C5; 
      color: white; 
      font-size: 18px; 
      font-weight: bold; 
      height: 50px; 
      border-radius: 4px; 
    } 
    .smBtn:hover 
    { 
      background: #4067EE; 
    } 
    .pull-right 
    { 
      display: inline-block; 
      float: right; 
    } 
    .other 
    { 
      width: 350px; 
      padding-top: 50px; 
      margin: 0 auto; 
    } 
    .toggleDiv1,.toggleDiv2 
    { 
      position: absolute; 
      right: 0; 
      bottom: 0; 
      z-index: 1000; 
    } 
    .weima 
    { 
      text-align: center; 
      padding-top: 50px; 
      width: 390px; 
      height: 400px; 
    } 
    .weima p  
    { 
      line-height: 50px; 
    } 
    .choice2 
    { 
      display: none; 
    } 
    #close:hover 
    { 
      cursor: pointer; 
      color: blue; 
    } 
  </style> 
</head> 
<body> 
<!-- 賬號密碼登錄 --> 
  <div class="wrap"> 
    <div class="header"> 
      <h3>登錄百度賬號</h3> 
      <span id="close" title="關(guān)閉">X</span> 
    </div> 
    <div class="choice1"> 
      <div class="main"> 
      <a href="" class=" rel="external nofollow" rel="external nofollow" rel="external nofollow" phoneIn">短信快捷登錄</a> 
      <form action=""> 
        <input type="text" class="inputDiv" placeholder="手機/郵箱/賬號"> 
        <input type="password" class="inputDiv" placeholder="請輸入登錄密碼"> 
        <p class="inputDiv"> 
        <input type="checkbox" value="checked" checked="checked"><label for="">下次自動登錄</label> 
        <a href="" class=" rel="external nofollow" rel="external nofollow" rel="external nofollow" pull-right" >登錄遇到問題</a> 
        </p> 
        <input type="submit" value="登錄" class="inputDiv smBtn"> 
        <a href="" class=" rel="external nofollow" rel="external nofollow" rel="external nofollow" pull-right" >立即注冊</a> 
      </form> 
      <div class="other"> 
      <p>可以使用以下方式登錄</p> 
      <a href=""><img src=" rel="external nofollow" rel="external nofollow" images/qq.png" alt=""></a> 
      <a href=""><img src=" rel="external nofollow" rel="external nofollow" images/wb.png" alt=""></a> 
      </div> 
    </div> 
    <div class="toggleDiv1"> 
      <img src="images/small2wm.png" alt=""> 
      </div> 
    </div> 
    <!-- 二維碼登錄 --> 
<div class="choice2"> 
    <div class="weima"> 
    <p>手機掃描,安全登錄</p> 
    <img src="images/2weima.png" alt=""> 
    <p>請使用手機百度app掃描登錄</p> 
  </div> 
    <div class="toggleDiv2"> 
      <img src="images/cpt.png" alt=""> 
    </div> 
  </div> 
  </div> 
</body> 
<!-- 導(dǎo)入jquery文件 --> 
<script type="text/javascript" src="jquery-3.1.1.min.js"></script> 
<script> 
  $(document).ready(function(){ 
  /*這是一個自定義的函數(shù),作用是設(shè)置class1類為隱藏,class2類顯示*/ 
     function showDiv(class1,class2){ 
      $(class1).css("display","none"); 
      $(class2).css("display","block"); 
     } 
  /*給右下角的圖標設(shè)置點擊事件*/ 
    $('.toggleDiv1').click(function(){ 
      showDiv(".choice1",".choice2"); 
    }) 
    $('.toggleDiv2').click(function(){ 
      showDiv(".choice2",".choice1"); 
    }) 
  /*給右上角的關(guān)閉按鈕設(shè)置點擊事件*/ 
    $("#close").click(function(){ 
      $(".wrap").css("display","none"); 
    }) 
  }) 
</script> 
</html> 

以上所述是小編給大家介紹的jQuery實現(xiàn)百度登錄框的動態(tài)切換效果,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復(fù)大家的。在此也非常感謝大家對腳本之家網(wǎng)站的支持!

相關(guān)文章

  • jQuery選擇器源碼解讀(二):select方法

    jQuery選擇器源碼解讀(二):select方法

    這篇文章主要介紹了jQuery選擇器源碼解讀(二):select方法,本文用詳細的注釋解讀了select方法的實現(xiàn)源碼,需要的朋友可以參考下
    2015-03-03
  • jquery中filter方法用法實例分析

    jquery中filter方法用法實例分析

    這篇文章主要介紹了jquery中filter方法用法,實例分析了filter方法的功能并對比了與find方法的區(qū)別,需要的朋友可以參考下
    2015-02-02
  • jQuery unbind()方法實例詳解

    jQuery unbind()方法實例詳解

    這篇文章主要介紹了jQuery unbind()方法,結(jié)合實例形式詳細分析了unbind方法解除綁定的使用技巧,需要的朋友可以參考下
    2016-01-01
  • Dreamweaver jQuery智能提示插件,支持版本提示,支持1.6api

    Dreamweaver jQuery智能提示插件,支持版本提示,支持1.6api

    1.2.0版本插件在1.0.0插件基礎(chǔ)上進一步修改,版權(quán)信息僅保留致謝信息,刪除作者為了代碼整體提示美觀度,故將jQuery官方兩位數(shù)版本變更為三位數(shù)版本
    2011-07-07
  • jquery獲取顏色在ie和ff下的區(qū)別示例介紹

    jquery獲取顏色在ie和ff下的區(qū)別示例介紹

    在使用$(#id).attr(color) 獲取顏色的時候,ie和ff是不同的,下面有個示例,大家可以參考下
    2014-03-03
  • 一個小例子解釋如何來阻止Jquery事件冒泡

    一個小例子解釋如何來阻止Jquery事件冒泡

    事件會向這個對象的父級對象傳播,從里到外,直至它被處理(父級對象所有同類事件都將被激活),或者它到達了對象層次的最頂層
    2014-07-07
  • 分享27款非常棒的jQuery 表單插件

    分享27款非常棒的jQuery 表單插件

    jQuery的易擴展性吸引了來自全球的開發(fā)者來共同編寫jQuery插件。jQuery插件不僅能夠增強網(wǎng)站的可用性,有效地改善用戶體驗,還可以大大減少開發(fā)時間。
    2011-03-03
  • DOM事件階段以及事件捕獲與事件冒泡先后執(zhí)行順序(圖文詳解)

    DOM事件階段以及事件捕獲與事件冒泡先后執(zhí)行順序(圖文詳解)

    DOM事件標準定義了兩種事件流,這兩種事件流有著顯著的不同并且可能對你的應(yīng)用有著相當大的影響。這兩種事件流分別是捕獲和冒泡。和許多Web技術(shù)一樣,在它們成為標準之前,Netscape和微軟各自不同地實現(xiàn)了它們,下面介紹DOM事件階段以及事件捕獲與事件冒泡先后執(zhí)行順序
    2015-08-08
  • jQuery實現(xiàn)的分頁功能示例

    jQuery實現(xiàn)的分頁功能示例

    這篇文章主要介紹了jQuery實現(xiàn)的分頁功能,結(jié)合實例形式較為詳細的分析了jQuery實現(xiàn)分頁功能的具體步驟及相關(guān)操作技巧,包括前臺樣式、布局及jQuery分頁插件的調(diào)用方法,需要的朋友可以參考下
    2017-01-01
  • JQUERY 獲取IFrame中對象及獲取其父窗口中對象示例

    JQUERY 獲取IFrame中對象及獲取其父窗口中對象示例

    經(jīng)常會用到iframe,難免會碰到需要在父窗口中使用iframe中的元素、或者在iframe框架中使用父窗口的元素,下面為大家簡單介紹下本人的使用心得
    2013-08-08

最新評論