css 样式(checkbox开关、css按钮)

 

checkbox开关

css

   .iosCheck {
        /* Blue edition */
    }
    .iosCheck input {
        display: none;
    }
    .iosCheck i {
        display: inline-block;
        cursor: pointer;
        padding-right: 25px;
        transition: all ease 0.2s;
        -webkit-transition: all ease 0.2s;
        border-radius: 25px;
        box-shadow: inset 0 0 1px rgba(0, 0, 0, 0.5);
    }
    .iosCheck i:before {
        display: block;
        content: '';
        width: 25px;
        height: 25px;
        border-radius: 25px;
        background: white;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    }
    .iosCheck :checked + i {
        padding-right: 0;
        padding-left: 25px;
        background: #00e970;
        box-shadow: inset 0 0 1px rgba(0, 0, 0, 0.5), inset 0 0 40px #00e079;
        -webkit-box-shadow: inset 0 0 1px rgba(0, 0, 0, 0.5), inset 0 0 40px #00e079;
    }
    .iosCheck.blue :checked + i {
        background: #6cbff0;
        box-shadow: inset 0 0 1px rgba(0, 0, 0, 0.5), inset 0 0 40px #0093ea;
        -webkit-box-shadow: inset 0 0 1px rgba(0, 0, 0, 0.5), inset 0 0 40px #0093ea;
    }
    /* General styling */

 

html

<label class="iosCheck">
    <input type="checkbox" name="register_give_switch"/>
    <i></i>
</label>

 

css按钮

css

 /* clean gray ***  start *******************************************************************************/
.clean-gray {
  background-color: #eeeeee;
  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #eeeeee), color-stop(100%, #cccccc));
  background-image: -webkit-linear-gradient(top, #eeeeee, #cccccc);
  background-image: -moz-linear-gradient(top, #eeeeee, #cccccc);
  background-image: -ms-linear-gradient(top, #eeeeee, #cccccc);
  background-image: -o-linear-gradient(top, #eeeeee, #cccccc);
  background-image: linear-gradient(top, #eeeeee, #cccccc);
  border: 1px solid #ccc;
  border-bottom: 1px solid #bbb;
  border-radius: 3px;
  color: #333;
  font: bold 11px/1 "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
  padding: 1px 0;
  text-align: center;
  text-shadow: 0 1px 0 #eee;
  width: 150px;
}
.clean-gray:hover {
    background-color: #dddddd;
    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #dddddd), color-stop(100%, #bbbbbb));
    background-image: -webkit-linear-gradient(top, #dddddd, #bbbbbb);
    background-image: -moz-linear-gradient(top, #dddddd, #bbbbbb);
    background-image: -ms-linear-gradient(top, #dddddd, #bbbbbb);
    background-image: -o-linear-gradient(top, #dddddd, #bbbbbb);
    background-image: linear-gradient(top, #dddddd, #bbbbbb);
    border: 1px solid #bbb;
    border-bottom: 1px solid #999;
    cursor: pointer;
    text-shadow: 0 1px 0 #ddd; 
}
.clean-gray:active {
    border: 1px solid #aaa;
    border-bottom: 1px solid #888;
    -webkit-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
    box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; 
}
.detail-btn {
    margin: 0 auto;
    padding: 0 10px;
    text-decoration: none;
}
.detail-btn:hover {
    text-decoration: none;
}
/* clean gray ***  end *******************************************************************************/

html

<span  class="clean-gray detail-btn sorry">取消</span>

 

转载于:https://www.cnblogs.com/yhdsir/p/5000110.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值