• 如何改变checkbox的样式


    <!doctype html>

    <html>
     
        <head>
            <meta charset="utf-8">
            <title>chec</title>
     
            <style>
                #container {
                    margin: 20px auto;
                }
                 
                #container span {
                    position: relative;
                }
                 
                #container .input_check {
                    position: absolute;
                    visibility: hidden;
                }
                 
                #container .input_check+label {
                    display: inline-block;
                     16px;
                    height: 16px;
                    border: 1px solid #fd8845;
                }
                 
                #container .input_check:checked+label:after {
                    content: "";
                    position: absolute;
                    left: 2px;
                    bottom: 12px;
                     9px;
                    height: 4px;
                    border: 2px solid #fd8845;
                    border-top-color: transparent;
                    border-right-color: transparent;
                    -ms-transform: rotate(-60deg);
                    -moz-transform: rotate(-60deg);
                    -webkit-transform: rotate(-60deg);
                    transform: rotate(-45deg);
                }
            </style>
        </head>
     
        <body>
     
            <h3>利用css的:after跟transform属性代替checkbox效果</h3>
            <div id="container">
                <span><input type="checkbox"class="input_check" id="check3"><label for="check3"></label></span>
                <span><input type="checkbox"class="input_check" id="check4"><label for="check4"></label></span>
            </div>
        </body>
     
    </html>
    转http://www.tuicool.com/articles/uMzeQf
  • 相关阅读:
    测试 多线程 实现 callable 带返回值
    给定一个 hashMap 最终输出最大值的键
    正则判断输入的字符(英文、数字、空格、其他)的个数
    当返回值为json字符串时 如何获得其中的json数组
    thread run 和 start 的区别
    docker 构建dockerfile
    jsonp 跨域
    springsession 实现session 共享
    通过反射获得 spring 的 RequestMapping value值
    redis 集群搭建 以及 报错解决
  • 原文地址:https://www.cnblogs.com/fms-3/p/9079699.html
Copyright © 2020-2023  润新知