校园春色亚洲色图_亚洲视频分类_中文字幕精品一区二区精品_麻豆一区区三区四区产品精品蜜桃

主頁 > 知識庫 > 分享一個H5原生form表單的checkbox特效代碼

分享一個H5原生form表單的checkbox特效代碼

熱門標簽:跟電銷機器人做同事 威海營銷外呼系統招商 農村住宅地圖標注 濟南辦理400電話 鄭州電銷外呼系統違法嗎 漳州人工外呼系統排名 ai電銷機器人連接網關 鶴壁手機自動外呼系統怎么安裝 中紳電銷智能機器人

本文介紹了分享一個H5原生form表單的checkbox特效代碼,分享給大家,具體如下:

效果如下:

<!DOCTYPE html>
<html>

 <head>
  <meta charset="UTF-8">
  <title></title>
  <style>
   .md-checkbox {
    margin: 50px;
    position: relative;
    height: auto;
    font-size: 14px;
   }
   .md-checkbox label>span.inc {
    -webkit-animation: growCircle 0.2s ease;
    -moz-animation: growCircle 0.2s ease;
    animation: growCircle 0.2s ease;
   }
   
   @keyframes growCircle {
    0%,
    100% {
     transform: scale(0);
     opacity: 0.8;
    }
    70% {
     background: #eee;
     transform: scale(1.25);
    }
   }
   
   .md-checkbox label>span.inc {
    background: #fff;
    left: -20px;
    top: -20px;
    height: 60px;
    width: 60px;
    opacity: 0;
    border-radius: 50% !important;
    -moz-border-radius: 50% !important;
    -webkit-border-radius: 50% !important;
   }
   
   .md-checkbox input[type=checkbox] {
    visibility: hidden;
    position: absolute;
   }
   
   .md-checkbox label {
    cursor: pointer;
    padding-left: 30px;
   }
   
   .md-checkbox label>span {
    display: block;
    position: absolute;
    left: 0;
    -webkit-transition-duration: 0.2s;
    -moz-transition-duration: 0.2s;
    transition-duration: 0.2s;
   }
   
   .md-checkbox label>.check {
    top: -4px;
    left: 6px;
    width: 10px;
    height: 20px;
    border: 2px solid #26A69A;
    border-top: none;
    border-left: none;
    opacity: 0;
    z-index: 5;
    -webkit-transform: rotate(180deg);
    -moz-transform: rotate(180deg);
    transform: rotate(180deg);
    -webkit-transition-delay: 0.2s;
    -moz-transition-delay: 0.2s;
    transition-delay: 0.2s;
   }
   
   .md-checkbox input[type=checkbox]:checked~label>.check {
    opacity: 1;
    -webkit-transform: scale(1) rotate(45deg);
    -moz-transform: scale(1) rotate(45deg);
    transform: scale(1) rotate(45deg);
   }
   
   .md-checkbox input[type=checkbox]:checked~label>.box {
    opacity: 0;
    -webkit-transform: scale(0) rotate(-180deg);
    -moz-transform: scale(0) rotate(-180deg);
    transform: scale(0) rotate(-180deg);
   }
   
   .md-checkbox label>.box {
    top: 0px;
    border: 2px solid #666;
    height: 20px;
    width: 20px;
    z-index: 5;
    -webkit-transition-delay: 0.2s;
    -moz-transition-delay: 0.2s;
    transition-delay: 0.2s;
   }
  </style>
 </head>

 <body>
  <div class="md-checkbox">
   <input type="checkbox" id="test" class="md-check" />
   <label for="test">
    <span></span>
             <span class="check"></span>
             <span class="box"></span>
                Option 1 
   </label>
  </div>
  <script>
   var list = document.getElementsByTagName('input');
   for(var i =0;i<list.length;i++){
    (function(n){
     list[n].addEventListener('click',function(e){
      var inc = this.nextElementSibling.firstElementChild;
      inc.className  = '';
      setTimeout(function(){
       inc.className  = 'inc';
      },0);
     })
    })(i)
   }
  </script>
 </body>

</html>

以上就是本文的全部內容,希望對大家的學習有所幫助,也希望大家多多支持腳本之家。

標簽:甘南 蘇州 紅河 惠州 萍鄉 營口 咸陽 文山

巨人網絡通訊聲明:本文標題《分享一個H5原生form表單的checkbox特效代碼》,本文關鍵詞  分享,一個,原生,form,表單,;如發現本文內容存在版權問題,煩請提供相關信息告之我們,我們將及時溝通與處理。本站內容系統采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《分享一個H5原生form表單的checkbox特效代碼》相關的同類信息!
  • 本頁收集關于分享一個H5原生form表單的checkbox特效代碼的相關信息資訊供網民參考!
  • 推薦文章
    主站蜘蛛池模板: 乌拉特中旗| 高州市| 栾城县| 大洼县| 敦煌市| 巧家县| 大方县| 深州市| 湾仔区| 五台县| 深圳市| 碌曲县| 宁南县| 金华市| 巢湖市| 长春市| 拜泉县| 镇赉县| 大冶市| 天长市| 本溪市| 梧州市| 汉寿县| 鹰潭市| 台中县| 迭部县| 溧水县| 阿克陶县| 额尔古纳市| 海城市| 安徽省| 德惠市| 保康县| 清水河县| 宜兰市| 嘉黎县| 永善县| 新宾| 日土县| 昭苏县| 佛山市|