记住用户名密码
<!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <title>复选框美化(Modal)</title> <style> .check-wrap { position: relative; display: inline-block; vertical-align: middle; height: 24px; padding-left: 13px; line-height: 24px; font-size: 16px;color:#444444;} .check-wrap~.check-wrap{ margin-left: 10px; } .check-wrap > .icheck { opacity: 0; } .check-wrap > .ilabel { border-radius: 3px; cursor: pointer; display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; } .check-wrap > .ilabel:after {content: " ";border: 1px solid #999;display: block;font-weight: bold;text-align: center;border-radius: 3px;width: 22px;height: 22px;line-height: 22px;} .check-wrap > .icheck:checked + .ilabel:after {content: "✓";border-color: #999;background-color: #fff;color: #3ad045;} .check-wrap > .icheck:indeterminate + .ilabel:after { content: "■"; color: #3f51b5; background-color: #FFF; border-color: #3f51b5; } </style> </head> <body> <div class="check-wrap"> <input type="checkbox" class="icheck" id="checkbox1" name="check" value="1" checked/> <label for="checkbox1" class="ilabel"></label>文字1 </div> <div class="check-wrap"> <input type="checkbox" class="icheck" id="checkbox2" name="check" value="2"/> <label for="checkbox2" class="ilabel"></label>文字2 </div> <div class="check-wrap"> <input type="checkbox" class="icheck" id="checkbox3" name="check" value="3"/> <label for="checkbox3" class="ilabel"></label>文字3 </div> </body> </html>
目前有 0 条留言 其中:访客:0 条, 博主:0 条