日本一卡精品视频免费丨国产午夜片无码区在线播放丨国产精品成人久久久久久久丨国产亚洲日韩av在线播放不卡丨亚洲日韩av无码

DIV里純css3實現的超炫checkbox復選框和radio單選框

2016/8/25 9:06:04   閱讀:1573    發布者:1573

之前為大家分享了一些css3實現的按鈕。今天要為大家分享的是純css3實現的checkbox復選框和radio單選框,效果超級炫。先讓我們看看圖吧!

 

這個實例完全由css3實現的沒有任何js代碼。下面我們一起看下實現代碼吧

html代碼:


 <div style="width:200px; float:left"> 
            <label> 
                <input type="checkbox" class="option-input checkbox" checked=""> 
                Checkbox 
            </label> 
            <label> 
                <input type="checkbox" class="option-input checkbox"> 
                Checkbox 
            </label> 
            <label> 
                <input type="checkbox" class="option-input checkbox"> 
                Checkbox 
            </label> 
        </div> 
        <div style="width:200px; float:left"> 
            <label> 
                <input type="radio" class="option-input radio" name="example"> 
                Radio option 
            </label> 
            <label> 
                <input type="radio" class="option-input radio" name="example"> 
                Radio option 
            </label> 
            <label> 
                <input type="radio" class="option-input radio" name="example"> 
                Radio option 
            </label> 
        </div>


css3代碼:


@-webkit-keyframes click-wave { 
  0% { 
    width: 40px; 
    height: 40px; 
    opacity: 0.35; 
    position: relative; 
  } 
  100% { 
    width: 200px; 
    height: 200px; 
    margin-left: -80px; 
    margin-top: -80px; 
    opacity: 0.0; 
  } 
} 
@-moz-keyframes click-wave { 
  0% { 
    width: 40px; 
    height: 40px; 
    opacity: 0.35; 
    position: relative; 
  } 
  100% { 
    width: 200px; 
    height: 200px; 
    margin-left: -80px; 
    margin-top: -80px; 
    opacity: 0.0; 
  } 
} 
@-o-keyframes click-wave { 
  0% { 
    width: 40px; 
    height: 40px; 
    opacity: 0.35; 
    position: relative; 
  } 
  100% { 
    width: 200px; 
    height: 200px; 
    margin-left: -80px; 
    margin-top: -80px; 
    opacity: 0.0; 
  } 
} 
@keyframes click-wave { 
  0% { 
    width: 40px; 
    height: 40px; 
    opacity: 0.35; 
    position: relative; 
  } 
  100% { 
    width: 200px; 
    height: 200px; 
    margin-left: -80px; 
    margin-top: -80px; 
    opacity: 0.0; 
  } 
} 
.option-input { 
  -webkit-appearance: none; 
  -moz-appearance: none; 
  -ms-appearance: none; 
  -o-appearance: none; 
  appearance: none; 
  position: relative; 
  top: 13.33333px; 
  width: 40px; 
  height: 40px; 
  -webkit-transition: all 0.15s ease-out 0; 
  -moz-transition: all 0.15s ease-out 0; 
  transition: all 0.15s ease-out 0; 
  background: #cbd1d8; 
  border: none; 
  color: #fff; 
  cursor: pointer; 
  display: inline-block; 
  outline: none; 
  position: relative; 
  margin-right: 0.5rem; 
  z-index: 1000; 
} 
.option-input:hover { 
  background: #9faab7; 
} 
.option-input:checked { 
  background: #40e0d0; 
} 
.option-input:checked::before { 
  width: 40px; 
  height: 40px; 
  position: absolute; 
  content: ’\2716’; 
  display: inline-block; 
  font-size: 26.66667px; 
  text-align: center; 
  line-height: 40px; 
} 
.option-input:checked::after { 
  -webkit-animation: click-wave 0.65s; 
  -moz-animation: click-wave 0.65s; 
  animation: click-wave 0.65s; 
  background: #40e0d0; 
  content: ’’; 
  display: block; 
  position: relative; 
  z-index: 100; 
} 
.option-input.radio { 
  border-radius: 50%; 
} 
.option-input.radio::after { 
  border-radius: 50%; 
} 

body { 
  display: -webkit-box; 
  display: -moz-box; 
  display: box; 
  -webkit-box-orient: horizontal; 
  -moz-box-orient: horizontal; 
  box-orient: horizontal; 
  -webkit-box-pack: start; 
  -moz-box-pack: start; 
  box-pack: start; 
  -webkit-box-align: stretch; 
  -moz-box-align: stretch; 
  box-align: stretch; 
  background: #e8ebee; 
  color: #9faab7; 
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 
  text-align: center; 
} 
body div { 
  padding: 5rem; 
} 
body label { 
  display: block; 
  line-height: 40px; 
}


是不是很簡單。只要復制上面的html代碼和css代碼到頁面上。運行就可以看到效果了。趕緊試一試吧。哈哈

主站蜘蛛池模板: 无码人妻少妇色欲av一区二区| 欧美成人午夜精品久久久| 欧美日韩免费高清一区色橹橹| 亚洲va天堂va欧美片a在线| 特黄特色大片免费播放| 国产精品视频大全| 少妇做爰免费视看片| 国产97自拍| 直接观看黄网站免费视频| 亚洲婷婷av| 好湿好紧太硬了我太爽了视频| 天天草夜夜骑| 免费国产成人高清在线观看网站| 国产美女在线精品免费观看网址| 欧美日韩亚洲视频| 中文www天堂| 人妻精品制服丝袜久久久| 国产裸体舞一区二区三区| 亚洲精品精华液一区二区| 人妻少妇精品无码专区二区| 精品自拍第一页| 久久99精品国产.久久久久| 伊人成综合| 99久久精品日本一区二区免费| 一本大道久久东京热av| 欧美变态口味重另类在线视频| 天天摸天天做天天爽婷婷| 国产乱码精品一区二区三区中文| 午夜亚洲国产理论片一二三四| 人妻中文字幕av无码专区 | 久久婷婷五月综合97色一本一本| 国产精品亚洲色图| 无码帝国www无码专区色综合| 天天摸天天舔天天操| 久久综合亚洲色一区二区三区| 亚洲精品国产精| 免费人成在线视频无码| 久久国产精品精品国产色婷婷|