form.css 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. body {
  2. font-family: Arial, sans-serif;
  3. display: flex;
  4. justify-content: center;
  5. align-items: center;
  6. height: 100vh;
  7. margin: 0;
  8. background-color: #f4f4f4;
  9. }
  10. form {
  11. background: white;
  12. padding: 20px;
  13. border-radius: 8px;
  14. box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  15. width: 300px;
  16. }
  17. div {
  18. margin-bottom: 15px;
  19. }
  20. label {
  21. display: block;
  22. margin-bottom: 5px;
  23. }
  24. input[type="text"],
  25. input[type="number"] {
  26. width: 100%;
  27. padding: 8px;
  28. box-sizing: border-box;
  29. border: 1px solid #ccc;
  30. border-radius: 4px;
  31. }
  32. button {
  33. width: 100%;
  34. padding: 10px;
  35. background-color: #28a745;
  36. color: white;
  37. border: none;
  38. border-radius: 4px;
  39. cursor: pointer;
  40. }
  41. button:hover {
  42. background-color: #218838;
  43. }
  44. .error {
  45. color: red;
  46. font-size: 0.9em;
  47. }