1. <!DOCTYPE html>
    2. <html lang="en">
    3. <head>
    4. <meta charset="UTF-8">
    5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
    6. <meta http-equiv="X-UA-Compatible" content="ie=edge">
    7. <title>Document</title>
    8. <style type="text/css">
    9. .label-style {
    10. margin: 20px 20px 0 0;
    11. display: inline-block
    12. }
    13. .input-radio-style {
    14. display: none
    15. }
    16. .input-checkbox-style {
    17. display: none
    18. }
    19. .input-radio-span-style {
    20. background-color: #fff;
    21. border: 1px solid rgba(0, 0, 0, 0.15);
    22. border-radius: 100%;
    23. display: inline-block;
    24. height: 16px;
    25. margin-right: 10px;
    26. margin-top: -1px;
    27. vertical-align: middle;
    28. width: 16px;
    29. line-height: 1
    30. }
    31. .input-checkbox-span-style {
    32. background-color: #fff;
    33. border: 1px solid rgba(0, 0, 0, 0.15);
    34. border-radius: 0;
    35. display: inline-block;
    36. height: 16px;
    37. margin-right: 10px;
    38. margin-top: -1px;
    39. vertical-align: middle;
    40. width: 16px;
    41. line-height: 1
    42. }
    43. .input-radio-style:checked+.input-radio-span-style:after {
    44. background-color: #57ad68;
    45. border-radius: 100%;
    46. content: "";
    47. display: inline-block;
    48. height: 12px;
    49. margin: 2px;
    50. width: 12px
    51. }
    52. .input-checkbox-style:checked+.input-checkbox-span-style:after {
    53. background-color: #57ad68;
    54. border-radius: 0;
    55. content: "";
    56. display: inline-block;
    57. height: 12px;
    58. margin: 2px;
    59. width: 12px
    60. }
    61. </style>
    62. </head>
    63. <body>
    64. <div>
    65. <label class="label-style">
    66. <input class="input-radio-style" type="radio" name="app">
    67. <span class="input-radio-span-style"></span>
    68. </label>
    69. <label class="label-style">
    70. <input class="input-radio-style" type="radio" name="app">
    71. <span class="input-radio-span-style"></span>不约,叔叔我们不约
    72. </label>
    73. </div>
    74. <div>
    75. <label class="label-style">
    76. <input class="input-checkbox-style" type="checkbox">
    77. <span class="input-checkbox-span-style"></span>苍井空
    78. </label>
    79. <label class="label-style">
    80. <input class="input-checkbox-style" type="checkbox">
    81. <span class="input-checkbox-span-style"></span>波多野结衣
    82. </label>
    83. <label class="label-style">
    84. <input class="input-checkbox-style" type="checkbox">
    85. <span class="input-checkbox-span-style"></span>罗玉凤
    86. </label>
    87. </div>
    88. </body>
    89. </html>