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>

  • 相关阅读:
    Laravel框架中的event事件操作
    PHP魔术方法实例
    PHP 面向对象
    ThinkPHP中where()使用方法详解
    PHP常见错误提示含义解释
    php面向对象编程self和static的区别
    php文件路径获取文件名
    php三种无限分类
    php高精度计算问题
    转:JavaScript定时机制、以及浏览器渲染机制 浅谈
  • 原文地址:https://www.cnblogs.com/zhouyx/p/4623598.html
Copyright © 2011-2022 走看看