如何编辑联系表格7的单选按钮?

时间:2017-02-07 23:30:57

标签: html css forms contact

我通常不会像这样编辑单选按钮。但是我需要实现这个目标:http://i.imgur.com/KbJMWfn.png现在它看起来像这样:http://i.imgur.com/OFqifxk.png。该网站位于:getnoble.bdanzer.com,表单是您点击请求邀请时。我对于我应该去哪里的想法或想法有点失落?

1 个答案:

答案 0 :(得分:0)

这应该为你带来魔力

HTML

<ul>
  <li>
    <input type="radio" id="f-option" name="selector">
    <label for="f-option">Android</label>

    <div class="check"></div>
  </li>

  <li>
    <input type="radio" id="s-option" name="selector">
    <label for="s-option">iPhone</label>

    <div class="check"><div class="inside"></div></div>
  </li>

</ul>

CSS

ul li{
  color: #AAAAAA;
  display: block;
  position: relative;
  float: left;
  width: 100%;
  height: 100px;
    border-bottom: 1px solid #111111;
}
ul li input[type=radio]{
  position: absolute;
  visibility: hidden;
}

ul li label{
  display: block;
  position: relative;
  font-weight: 300;
  font-size: 1.35em;
  padding: 25px 25px 25px 80px;
  margin: 10px auto;
  height: 30px;
  z-index: 9;
  cursor: pointer;
  -webkit-transition: all 0.1s linear;
}

ul li:hover label{
    color: #FFFFFF;
}

ul li .check{
  display: block;
  position: absolute;
  border: 1px solid white;
  border-radius: 100%;
  height: 25px;
  width: 25px;
  top: 30px;
  left: 20px;
    z-index: 5;
    transition: border .1 linear;
    -webkit-transition: border .1 linear;
}

ul li:hover .check {
  border: 1px solid #FFFFFF;
}

ul li .check::before {
  display: block;
  position: absolute;
    content: '';
  border-radius: 100%;
  height: 15px;
  width: 15px;
  top: 5px;
    left: 5px;
  margin: auto;
    transition: background .1s linear;
    -webkit-transition: background .1s linear;
}

input[type=radio]:checked ~ .check {
  border: 2px solid blue;
}

input[type=radio]:checked ~ .check::before{
  background: blue;
}

input[type=radio]:checked ~ label{
  color: white;
}

工作示例https://codepen.io/anon/pen/LxJbJJ