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

    <!doctype html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>radio</title>
    </head>
    <body>

    <style>

    /* RADIO */
    .Radio{
        position: relative;
    }
    .regular-radio {
        display: none;
    }
    /*未选中时圆圈的样子图片或颜色*/
    .regular-radio + label {
        -webkit-appearance: none;
        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: 50px;
        display: inline-block;
        position: relative;
    }
    /*选中时圆圈里面的样子图片或颜色*/
    .regular-radio:checked + label:after {
        content: ' ';
        12px;
        height: 12px;
        border-radius: 50px;
        position: absolute;
        top: 3px;
        background: #99a1a7;
        box-shadow: inset 0px 0px 10px rgba(0,0,0,0.3);
        text-shadow: 0px;
        left: 3px;
        font-size: 32px;
    }
    /*选中圆圈的样子图片或颜色*/
    .regular-radio:checked + label {
        background-color: #e9ecee;
        color: #99a1a7;
        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), inset 0px 0px 10px rgba(0,0,0,0.1);
    }

    /*增大样式*/

    .big-radio + label {
        padding: 16px;
    }

    .big-radio:checked + label:after {
        24px;
        height: 24px;
        left: 4px;
        top: 4px;
    }
    /* ------- IGNORE */
    </style>
    <div class="Radio">
        <p>IE9以上版本支持</p>
        <div>
            <div class="tag">Radio Small</div>
            <div class="button-holder">
                <input type="radio" id="radio-1-1" name="radio-1-set" class="regular-radio" checked /><label for="radio-1-1"></label><br />
                <input type="radio" id="radio-1-2" name="radio-1-set" class="regular-radio" /><label for="radio-1-2"></label><br />
                <input type="radio" id="radio-1-3" name="radio-1-set" class="regular-radio" /><label for="radio-1-3"></label><br />
                <input type="radio" id="radio-1-4" name="radio-1-set" class="regular-radio" /><label for="radio-1-4"></label><br />
            </div>
        </div>
        <div>
            <div class="tag">Radio Big</div>
            <div class="button-holder">
                <input type="radio" id="radio-2-1" name="radio-2-set" class="regular-radio big-radio" /><label for="radio-2-1"></label><br />
                <input type="radio" id="radio-2-2" name="radio-2-set" class="regular-radio big-radio" /><label for="radio-2-2"></label><br />
                <input type="radio" id="radio-2-3" name="radio-2-set" class="regular-radio big-radio" checked /><label for="radio-2-3"></label><br />
                <input type="radio" id="radio-2-4" name="radio-2-set" class="regular-radio big-radio" /><label for="radio-2-4"></label><br />
                <input type="radio" id="radio-2-5" name="radio-2-set" class="regular-radio big-radio" /><label for="radio-2-5"></label><br />
            </div>
        </div>
    </div>


    </body>
    </html>

  • 相关阅读:
    今天一天看一天文档
    ImportError: No module named _md5解决方案
    Spelling Corrector & sphinx typo search
    linux下使用ipython的pylab模式时不显示图形的问题解决方案
    error: error in setup script: command 'build_exe' has no such option 'includefiles'
    【转】oracle之包的创建和应用
    ADO.NET 与 ORACLE
    SQL注入大全
    【转】oracle之循环语法
    ASP.NET 防止按钮多次提交解决方法
  • 原文地址:https://www.cnblogs.com/zhouyx/p/4623537.html
Copyright © 2011-2022 走看看