| San3yuan | 2534d42 | 2025-04-08 21:43:18 +0800 | [diff] [blame^] | 1 | .form { |
| 2 | display: flex; |
| 3 | flex-direction: column; |
| 4 | align-items: center; /* Center items horizontally */ |
| 5 | justify-content: center; /* Center items vertically */ |
| 6 | height: 40%; /* Occupy 40% of the viewport height */ |
| 7 | width:25%; |
| 8 | background-color: #f0f8ff; /* Light blue background */ |
| 9 | box-shadow: 3px 3px 5px 6px #ccc; |
| 10 | position: absolute; /* Position the form absolutely */ |
| 11 | top: 50%; /* Move to the middle of the viewport */ |
| 12 | left: 50%; /* Center horizontally */ |
| 13 | transform: translate(-50%, -50%); /* Adjust for centering */ |
| 14 | border-radius: 10px; /* Add rounded corners */ |
| 15 | padding: 20px; /* Add padding for better spacing */ |
| 16 | box-sizing: border-box; /* Include padding and border in width/height */ |
| 17 | |
| 18 | } |
| 19 | |
| 20 | |
| 21 | .form input { |
| 22 | margin: 5px; |
| 23 | padding: 5px; |
| 24 | border-radius: 5px; |
| 25 | border: 1px solid #ccc; |
| 26 | font-size: 16px; |
| 27 | width: 80%; /* Adjust width for better appearance */ |
| 28 | max-width: 300px; /* Limit maximum width */ |
| 29 | box-sizing: border-box; |
| 30 | } |
| 31 | |
| 32 | .form .email, |
| 33 | .form .password { |
| 34 | margin: 10px; |
| 35 | padding: 10px; |
| 36 | border-radius: 5px; |
| 37 | border: 1px solid #ccc; |
| 38 | font-size: 16px; |
| 39 | width: 80%; |
| 40 | max-width: 300px; |
| 41 | } |
| 42 | |
| 43 | .form .submit { |
| 44 | margin: 10px; |
| 45 | padding: 10px; |
| 46 | border-radius: 5px; |
| 47 | border: 1px solid #ccc; |
| 48 | font-size: 16px; |
| 49 | background-color: #4CAF50; /* Green */ |
| 50 | color: white; |
| 51 | cursor: pointer; |
| 52 | width: 80%; |
| 53 | max-width: 300px; |
| 54 | } |
| 55 | |
| 56 | .form .submit:hover { |
| 57 | background-color: #45a049; /* Darker green */ |
| 58 | } |
| 59 | |
| 60 | .form button { |
| 61 | margin: 10px; |
| 62 | padding: 10px; |
| 63 | border-radius: 5px; |
| 64 | border: none; |
| 65 | font-size: 16px; |
| 66 | background-color: #007BFF; /* Blue */ |
| 67 | color: white; |
| 68 | cursor: pointer; |
| 69 | width: 80%; |
| 70 | max-width: 300px; |
| 71 | } |
| 72 | |
| 73 | .form button:hover { |
| 74 | background-color: #0056b3; /* Darker blue */ |
| 75 | } |