checkbox:

html:

<div>
  <label class="unSelected selected" for="choose">
    <checkbox clsss="choose"/>
  </label>
</div>
 
css:
.unSelected{
  display: inline-block;
  width:.2rem;
  height:.2rem;
  border-radius:50%;
  background-color:#ffffff;
  border: .02rem solid #999999;
}
.selected{
  border: none;
  display: inline-block;
  width:.22rem;
  height:.22rem;
  border-radius:50%;
  background-color:#0375FB;
  position: relative;
}
.selected:after {
  content: '\00a0';
  display: inline-block;
  border: .02rem solid #fff;
  border-top-width: 0;  
  border-right-width: 0;
  width: .1rem;
  height: .05rem;
  -webkit-transform: rotate(-50deg);
  position: absolute;
  top:.06rem;
  left:.05rem;
}
 
radio
html:
<div class="radio" v-for="(ik,iv) in v.answerItem">
  <input :id="'radio-'+ik" :name="'radio'+k" type="radio" :value="iv.value" v-model="v.inputAnswer"/>
  <label :for="'radio-'+ik" class="radio-label">{{iv.label}}</label>
</div>
 
css:
.radio {
  margin-bottom: .08rem;
}
.radio label {
  color: rgba(102, 102, 102, 1);
  font-size: .16rem;
  text-align: left;
  font-family: PingFangSC-regular;
}
.radio input[type="radio"] {
  position: absolute;
  opacity: 0;
}
.radio input[type="radio"]+.radio-label:before {
  content: '';
  background: #f4f4f4;
  border-radius: 100%;
  border: 1px solid #b4b4b4;
  display: inline-block;
  width: 1.2em;
  height: 1.2em;
  position: relative;
  top: .1em;
  margin-right: .5em;
  vertical-align: top;
  cursor: pointer;
  text-align: center;
  -webkit-transition: all 250ms ease;
  transition: all 250ms ease;
}
.radio input[type="radio"]:checked+.radio-label:before {
  background-color: #3197EE;
  box-shadow: inset 0 0 0 5px #f4f4f4;
}
.radio input[type="radio"]:focus+.radio-label:before {
  outline: none;
  border-color: #3197EE;
}
.radio input[type="radio"]:disabled+.radio-label:before {
  box-shadow: inset 0 0 0 4px #f4f4f4;
  border-color: #b4b4b4;
  background: #b4b4b4;
}
.radio input[type="radio"]+.radio-label:empty:before {
  margin-right: 0;
}
 

最新文章

  1. 每天成长一点---WEB前端学习入门笔记
  2. Linux学习之CentOS(二十一)--Linux系统启动详解
  3. DVWA安装,ALMP环境搭建以及php版本转换
  4. poj 1004:Financial Management(水题,求平均数)
  5. java 14 -6 BigInteger和BigDecimal
  6. 用 eric6 与 PyQt5 实现python的极速GUI编程(系列03)---- Drawing(绘图)(1)-- 绘写文字
  7. Spring MVC SimpleUrlHandlerMapping example
  8. python3操作socketserver
  9. 使用async和wait进行异步编程
  10. valueOf函数详解
  11. springboot~mongo内嵌集合的操作
  12. ElasticSearch简要总览
  13. Django2.0引入css、js、img文件
  14. 洛谷 P2774 方格取数问题 解题报告
  15. awk和sed (十二)
  16. 使用R内置函数操作数据框
  17. Spark RDD 窄依赖研究
  18. 《C++ Concurrency in Action》
  19. 20145104张家明 《Java程序设计》第6周学习总结
  20. Python Qt5 Creator 使用创建项目教程

热门文章

  1. linux典型应用对系统资源使用的特点
  2. Python网络编程:Linux epoll
  3. Linux ct6.5安装rabbitmq
  4. 【串线篇】Mybatis之SSM整合
  5. python实现简单接口
  6. SpringBoot---Servlet容器(Tomcat)配置
  7. 比传统事务快10倍?一张图读懂阿里云全局事务服务GTS
  8. springmvc的请求参数
  9. CSD编码----数字信号处理--006
  10. Hbuild X 打包 混合式app