zoukankan      html  css  js  c++  java
  • HTML单选按钮样式更换

    <!DOCTYPE html >
    <html lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>更换单选按钮显示样式</title>
        <style>
            input[type='radio'].radio {opacity:0; display:inline-block; height:20px; }
            label.radio {background:url(imgs/radio_check.png) no-repeat; height:20px; padding-left:25px;}
            input[type='radio'].radio:checked + .radio {background:url(imgs/radio_checked.png) no-repeat;}
        </style>
    </head>
    <body>
        
        <input type="radio" name="gender" id="x" value="X"><label for="x">我要保密</label><br>
        <input type="radio" name="gender" id="y" value="M"><label for="y">我是帅哥</label><br>
        <input type="radio" name="gender" id="z" value="F"><label for="z">我是美女</label><br>
        
        <input type="radio" name="sex" id="a" value="X" class="radio"><label for="a" class="radio">我要保密</label><br>
        <input type="radio" name="sex" id="b" value="M" class="radio"><label for="b" class="radio" >我是帅哥</label><br>
        <input type="radio" name="sex" id="c" value="F" class="radio"><label for="c" class="radio" >我是美女</label><br>
    </body>
    </html>

  • 相关阅读:
    NOIP simulation
    NOIP2013
    BZOJ 4176 Lucas的数论
    BZOJ 3512 DZY Loves Math IV
    BZOJ 3994 Sum
    BZOJ 4174 tty的求助
    BZOJ 3561 DZY Loves Math VI
    BZOJ 2508 简单题/BZOJ 3775 点和直线
    FTR #1 百步穿杨
    BZOJ 4407 于神之怒加强版
  • 原文地址:https://www.cnblogs.com/icerainsoft/p/4097886.html
Copyright © 2011-2022 走看看