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>

  • 相关阅读:
    Flink流处理(一)- 状态流处理简介
    YARN High Availablity
    把数组转换成sql中能使用的字符串
    StringUtils中 isNotEmpty 和isNotBlank的区别
    SQL的四种连接-左外连接、右外连接、内连接、全连接
    JS判断输入是否为整数的正则表达式
    Java构造和解析Json数据的两种方法详解二
    JSON详解
    Java构造和解析Json数据的两种方法详解一
    详细讲解JAVA中的IO流
  • 原文地址:https://www.cnblogs.com/zhouyx/p/4623537.html
Copyright © 2011-2022 走看看