用web做一个打车软件的打车页面的代码
时间: 2024-02-06 07:09:59 浏览: 26
以下是一个简单的打车页面的代码,包括起始点和目的地的输入框,以及提交按钮。请注意,这只是一个基本的框架,需要根据实际需求进行修改和优化。
```html
<!DOCTYPE html>
<html>
<head>
<title>打车服务</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
h1 {
text-align: center;
margin-top: 50px;
}
form {
text-align: center;
margin-top: 50px;
}
label {
display: block;
margin-bottom: 10px;
}
input[type="text"] {
padding: 10px;
border-radius: 5px;
border: 1px solid #ccc;
width: 80%;
max-width: 400px;
margin-bottom: 20px;
}
input[type="submit"] {
background-color: #4CAF50;
color: #fff;
padding: 10px 20px;
border-radius: 5px;
border: none;
cursor: pointer;
}
input[type="submit"]:hover {
background-color: #3e8e41;
}
</style>
</head>
<body>
<h1>打车服务</h1>
<form>
<label for="start">起始点:</label>
<input type="text" id="start" name="start" placeholder="请输入起始点">
<label for="destination">目的地:</label>
<input type="text" id="destination" name="destination" placeholder="请输入目的地">
<input type="submit" value="提交">
</form>
</body>
</html>
```
在这个基础上,你可以添加更多的功能,比如选择车型、选择支付方式等等。同时,你也需要编写后端代码来处理用户提交的请求,并返回相应的结果。