九九热线视频精品99-动漫高h纯肉无码视频在线观看-午夜理论无码片在线观看免费-99精品国产在热久久无码-亚洲国产成人乱码

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

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

之前為大家分享了一些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代碼到頁面上。運行就可以看到效果了。趕緊試一試吧。哈哈

主站蜘蛛池模板: 午夜福利电影网站鲁片大全 | 国产欧美在线一区二区三区 | 久久精品无码一区二区app| 偷欧洲亚洲另类图片av天堂| av影音先锋最大资源网| 在线中文新版最新版在线| 少妇人妻中文字幕hd| 99re6在线视频精品免费下载| 精品人妻少妇一区二区| 啦啦啦www播放日本观看| 精产国品一二三产品麻豆| 欧美日韩免费一区中文| 亚洲色大成成人网站久久| 在线v片免费观看视频| 日本一区二区专线| √天堂8资源中文在线| 人妻无码中字在线a| 男女啪啪高潮无遮挡免费| 中国熟女仑乱hd| 99视频有精品视频高清| 国产精品久久久久久久久久久久人四虎| 亚洲性夜夜天天天| 性xxxxx欧美极品少妇| 国产无遮挡又黄又爽又色| 人妻av一区二区三区精品| 亚洲午夜高清国产拍| 18禁美女裸身无遮挡免费网站| 亚洲偷自拍国综合| 亚洲高清国产拍精品动图| 亚洲国产果冻传媒av在线观看| 亚洲 日本 欧洲 欧美 视频| 久久精品成人免费国产| 大胆日本熟妇xxxx| 在线视频国产99| 亚洲人成网线在线播放| 婷婷丁香五月激情综合| 久久爱www免费人成av| 青青草国产成人久久| 国产一区丝袜高跟鞋| 国产无遮挡a片无码免费软件| 免费裸体美女网站|