CSS外賣訂餐過程代碼如下:
.header { background-color: #fe5d3a; padding: 10px; } .navbar { background-color: #f9f9f9; border-bottom: 1px solid #ddd; padding: 10px; } .menu { display: flex; flex-wrap: wrap; } .menu-item { width: 25%; margin-bottom: 20px; } .menu-item img { width: 100%; } .menu-item-name { font-size: 18px; font-weight: bold; margin-top: 10px; } .menu-item-price { color: #fe5d3a; font-size: 16px; margin-top: 5px; } .order-summary { background-color: #f9f9f9; border-top: 1px solid #ddd; padding: 10px; } .order-summary h3 { font-size: 18px; margin-top: 0; margin-bottom: 10px; } .order-summary p { margin: 0; } .order-form { background-color: #f9f9f9; border-top: 1px solid #ddd; padding: 10px; } .order-form input[type="text"], .order-form input[type="tel"], .order-form input[type="email"] { width: 100%; padding: 10px; margin-bottom: 10px; border: 1px solid #ddd; border-radius: 5px; } .order-form input[type="submit"] { background-color: #fe5d3a; color: #fff; padding: 10px 20px; border: none; border-radius: 5px; cursor: pointer; } .order-form input[type="submit"]:hover { background-color: #ff7c63; }
以上代碼涵蓋了外賣訂餐頁面所需的樣式,包括頂部導航欄、菜單列表、訂單總結部分和訂單信息表單部分等。