zoukankan      html  css  js  c++  java
  • 美化复选框

    <!doctype html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>canvas</title>
        <script src="js/jquery-1.9.1.min.js"></script>
    </head>
    <body>

    <style>
    .Checkbox{
        position: relative;
    }
    .regular-checkbox{
        display: none;
    }
    .regular-checkbox + label {
        background-color: #fafafa;
        border: 1px solid #cacece;
        box-shadow: 0 1px 2px rgba(0,0,0,0.05), inset 0px -15px 10px -12px rgba(0,0,0,0.05);
        padding: 9px;
        border-radius: 3px;
        display: inline-block;
        position: relative;
    }

    .regular-checkbox + label:active, .regular-checkbox:checked + label:active {
        box-shadow: 0 1px 2px rgba(0,0,0,0.05), inset 0px 1px 3px rgba(0,0,0,0.1);
    }

    .regular-checkbox:checked + label {
        background-color: #e9ecee;
        border: 1px solid #adb8c0;
        box-shadow: 0 1px 2px rgba(0,0,0,0.05), inset 0px -15px 10px -12px rgba(0,0,0,0.05), inset 15px 10px -12px rgba(255,255,255,0.1);
        color: #99a1a7;
    }

    .regular-checkbox:checked + label:after {
        content: '2714';
        14px;
        height: 14px;
        font-size: 14px;
        position: absolute;
        top: 0px;
        left: 3px;
        color: #99a1a7;
        /* border-radius: 50px;
       background:url(images/logo.png) repeat;
        box-shadow: inset 0px 0px 10px rgba(0,0,0,0.3);*/

    }


    .big-checkbox + label {
        padding: 18px;
    }
    .big-checkbox:checked + label:after {
        content: '2714';
        28px;
        height: 28px;
        font-size:28px;
        position: absolute;
        top: 0px;
        left: 8px;
        color: #99a1a7;
        /*border-radius: 50px;
        background:url(images/logo.png) repeat;
        box-shadow: inset 0px 0px 10px rgba(0,0,0,0.3);*/
    }

    .tag {
        font-family: Arial, sans-serif;
        200px;
        position: relative;
        top: 5px;
        font-weight: bold;
        text-transform: uppercase;
        display: block;
        float: left;
    }


    </style>
    <div class="Checkbox">
        <p> IE9以上版本支持</p>
        <div>
            <div class="tag">Checkbox Small</div>
            <input type="checkbox" id="checkbox-1-1" class="regular-checkbox" /><label for="checkbox-1-1"></label>
            <input type="checkbox" id="checkbox-1-2" class="regular-checkbox" /><label for="checkbox-1-2"></label>
            <input type="checkbox" id="checkbox-1-3" class="regular-checkbox" /><label for="checkbox-1-3"></label>
            <input type="checkbox" id="checkbox-1-4" class="regular-checkbox" /><label for="checkbox-1-4"></label>
        </div>
        <br />
        <div>
            <div class="tag">Checkbox Big</div>
            <input type="checkbox" id="checkbox-2-1" class="regular-checkbox big-checkbox" /><label for="checkbox-2-1"></label>
            <input type="checkbox" id="checkbox-2-2" class="regular-checkbox big-checkbox" /><label for="checkbox-2-2"></label>
            <input type="checkbox" id="checkbox-2-3" class="regular-checkbox big-checkbox" /><label for="checkbox-2-3"></label>
            <input type="checkbox" id="checkbox-2-4" class="regular-checkbox big-checkbox" /><label for="checkbox-2-4"></label>
        </div>

    </div>

    </body>
    </html>

  • 相关阅读:
    SQL语句
    [Tips] FTP服务器设置
    [Tips] filezilla连接成功,但是读取列表失败
    [Tips] 安装支持树莓派4b的系统
    [Tips] Ubuntu添加硬盘
    [Tips] BMC添加硬盘并进行raid1设置
    [Tips] docker 中遇到fork/exec /bin/sh: operation not permitted错误
    vue elementui el-cascader级联选择器没子级时出现暂无数据问题
    vue复选框勾选的内容,点击分页之后勾选的状态仍然保存。
    下载导出内容,带类型的//////下载,打印,下载源文件,不加mime类型
  • 原文地址:https://www.cnblogs.com/zhouyx/p/4623598.html
Copyright © 2011-2022 走看看