gpt-3.5-turbo-0301· OpenAI
WildChat-4.8M (AI2)
使用bootstrap做登录界面,并且要必填验证
- User
使用bootstrap做登录界面,并且要必填验证
- Assistant
以下是示例代码:
<!DOCTYPE html> <html> <head> <title>Login Form</title> <!-- Required meta tags --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <!-- Bootstrap CSS --> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet" > <!-- Font Awesome Icons --> <link href="https://use.fontawesome.com/releases/v5.0.6/css/all.css" rel="stylesheet"> <!-- Custom CSS --> <style> body { background-color: #F5F5F5; } .container{ margin: 0 auto; margin-top: 100px; max-width: 500px; background: #FFFFFF; padding: 30px; border-radius: 5px; box-shadow: 0px 0px 8px #BDBDBD; } h2 { text-align: center; margin-bottom: 30px; } </style> </head> <body> <div class="container"> <h2>Login Form</h2> <form> <div class="form-group"> <label for="email">Email address</label> <input type="email" class="form-control" id="email" aria-describedby="emailHelp" placeholder="Enter email" required> <small id="emailHelp" class="form-text text-muted">We'll never share your email with anyone else.</small> </div> <div class="form-group"> <label for="password">Password</label> <input type="password" class="form-control" id="password" placeholder="Password" required> </div> <div class="form-group form-check"> <input type="checkbox" class="form-check-input" id="rememberMe"> <label class="form-check-label" for="rememberMe">Remember me</label> </div> <button type="submit" class="btn btn-primary">Submit</button> </form> </div> <!-- jQuery --> <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script> <!-- Popper.js --> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script> <!-- Bootstrap JS --> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script> </body> </html> - User
使用bootstrap5编写
- Assistant
以下是使用Bootstrap 5编写的示例代码:
<!DOCTYPE html> <html> <head> <title>Login Form</title> <!-- Required meta tags --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- Bootstrap CSS --> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" > <!-- Font Awesome Icons --> <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" rel="stylesheet"> <!-- Custom CSS --> <style> body { background-color: #F5F5F5; } .container{ margin: 0 auto; margin-top: 100px; max-width: 500px; background: #FFFFFF; padding: 30px; border-radius: 5px; box-shadow: 0px 0px 8px #BDBDBD; } h2 { text-align: center; margin-bottom: 30px; } </style> </head> <body> <div class="container"> <h2>Login Form</h2> <form> <div class="mb-3"> <label for="email" class="form-label">Email address</label> <input type="email" class="form-control" id="email" aria-describedby="emailHelp" placeholder="Enter email" required> <small id="emailHelp" class="form-text text-muted">We'll never share your email with anyone else.</small> </div> <div class="mb-3"> <label for="password" class="form-label">Password</label> <input type="password" class="form-control" id="password" placeholder="Password" required> </div> <div class="mb-3 form-check"> <input type="checkbox" class="form-check-input" id="rememberMe"> <label class="form-check-label" for="rememberMe">Remember me</label> </div> <button type="submit" class="btn btn-primary">Submit</button> </form> </div> <!-- Bootstrap JS --> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script> </body> </html>