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

主頁 > 知識庫 > 分享一個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特效代碼的相關信息資訊供網民參考!
  • 推薦文章
    主站蜘蛛池模板: 喀喇沁旗| 广宁县| 定陶县| 东乡族自治县| 武汉市| 昆明市| 玛曲县| 北辰区| 乐陵市| 惠安县| 建宁县| 岐山县| 修水县| 靖州| 饶平县| 闽侯县| 屏东县| 称多县| 灵宝市| 万全县| 福建省| 上饶县| 商南县| 景宁| 邹城市| 道孚县| 济南市| 九台市| 常德市| 江都市| 勐海县| 泌阳县| 永吉县| 上杭县| 邹城市| 麻城市| 凤台县| 新乐市| 荥经县| 泌阳县| 开阳县|