• 利用input-radio和input-checkbox的表单特性可以节省很多js代码


    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <title>Title</title>
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />
    <style type="text/css">

    input[type=radio]{
    100px;
    height:100px;
    background: url('222.jpg') no-repeat center;
    background-size: cover;
    border:3px solid red ;
    -webkit-appearance: none
    }
    input[type=radio]:checked{
    border-color: green;
    outline: 0;

    }

    input[type=checkbox]{
    100px;
    height:100px;

    background: red;
    border:3px solid red ;
    -webkit-appearance: none
    }
    input[type=checkbox]:checked{
    background: green;
    outline: 0
    }

    </style>
    </head>
    <body>
    <input type="radio" name="aa">
    <input type="radio" name="aa">
    <input type="checkbox" name="aa">
    <input type="checkbox" name="aa">
    <input type="checkbox" name="aa">
    <input type="checkbox" name="aa">
    <script>
    </script>
    </body>
    </html>

  • 相关阅读:
    密码加密
    注册视图
    session会话
    验证码功能
    使用Django表单替代html表单
    实现登陆视图功能
    设计登陆需求页面
    配置视图
    配置数据库
    npm 学习
  • 原文地址:https://www.cnblogs.com/liuhao-web/p/8990704.html
Copyright © 2020-2023  润新知