fix<添加样式>

v2
liyansheng 2024-12-22 22:06:28 +08:00
parent f86c48f43c
commit 366eee15a7
3 changed files with 249 additions and 38 deletions

View File

@ -6,19 +6,88 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>电脑产品发布</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f0f8ff; /* 天蓝色背景 */
color: #333; /* 深色文本 */
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
h1 {
color: #4682b4; /* 天蓝色标题 */
margin-bottom: 20px;
}
form {
background-color: #ffffff;
padding: 20px;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
width: 300px;
text-align: center;
}
label {
font-size: 14px;
color: #4682b4; /* 天蓝色标签 */
display: block;
margin-bottom: 8px;
}
input[type="text"] {
width: 100%;
padding: 8px;
margin: 8px 0;
border: 1px solid #ccc;
border-radius: 4px;
}
input[type="submit"] {
background-color: #4682b4; /* 天蓝色按钮 */
color: white;
padding: 10px;
border: none;
border-radius: 4px;
width: 100%;
cursor: pointer;
}
input[type="submit"]:hover {
background-color: #5a9bd3; /* 按钮悬停时颜色 */
}
a {
display: block;
margin-top: 10px;
color: #4682b4; /* 天蓝色链接 */
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<h1>电脑产品发布</h1>
<form action="/computer?action=add" method="post">
<label for="name">名称: </label><br>
<input type="text" id="name" name="name"><br><br>
<label for="price">价格: </label><br>
<input type="text" id="price" name="price"><br><br>
<label for="stock">库存: </label><br>
<input type="text" id="stock" name="stock"><br><br>
<input type="submit" value="确定">
</form>
<br>
<a href="/computer?action=list">返回电脑列表</a>
<div>
<h1>电脑产品发布</h1>
<form action="/computer?action=add" method="post">
<label for="name">名称: </label><br>
<input type="text" id="name" name="name"><br><br>
<label for="price">价格: </label><br>
<input type="text" id="price" name="price"><br><br>
<label for="stock">库存: </label><br>
<input type="text" id="stock" name="stock"><br><br>
<input type="submit" value="确定">
</form>
<br>
<a href="/computer?action=list">返回电脑列表</a>
</div>
</body>
</html>

View File

@ -7,19 +7,92 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>订单确认</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f0f8ff; /* 天蓝色背景 */
color: #333; /* 深色文本 */
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
h1 {
color: #4682b4; /* 天蓝色标题 */
margin-bottom: 20px;
}
form {
background-color: #ffffff;
padding: 20px;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
width: 300px;
text-align: center;
}
label {
font-size: 14px;
color: #4682b4; /* 天蓝色标签 */
display: block;
margin-bottom: 8px;
}
input[type="text"], textarea {
width: 100%;
padding: 8px;
margin: 8px 0;
border: 1px solid #ccc;
border-radius: 4px;
}
textarea {
resize: vertical;
}
input[type="submit"] {
background-color: #4682b4; /* 天蓝色按钮 */
color: white;
padding: 10px;
border: none;
border-radius: 4px;
width: 100%;
cursor: pointer;
}
input[type="submit"]:hover {
background-color: #5a9bd3; /* 按钮悬停时颜色 */
}
a {
display: block;
margin-top: 10px;
color: #4682b4; /* 天蓝色链接 */
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<h1>订单确认</h1>
<form action="/orders" method="post">
<label for="price">总金额: </label><br>
<input type="text" id="price" name="price" value="${order.totalPrice}" readonly><br><br>
<label for="address">地址: </label><br>
<input type="text" id="address" name="address" value="${order.address}" required><br><br>
<label for="remark">商品信息: </label><br>
<textarea id="remark" name="remark" rows="15" cols="30" readonly>${order.remark}</textarea><br><br>
<input type="submit" value="我已确认">
</form>
<br>
<div>
<h1>订单确认</h1>
<form action="/orders" method="post">
<label for="price">总金额: </label><br>
<input type="text" id="price" name="price" value="${order.totalPrice}" readonly><br><br>
<label for="address">地址: </label><br>
<input type="text" id="address" name="address" value="${order.address}" required><br><br>
<label for="remark">商品信息: </label><br>
<textarea id="remark" name="remark" rows="15" cols="30" readonly>${order.remark}</textarea><br><br>
<input type="submit" value="我已确认">
</form>
<br>
<a href="/orders">返回订单列表</a>
</div>
</body>
</html>
</html>

View File

@ -7,20 +7,89 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>更新电脑信息</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f0f8ff; /* 天蓝色背景 */
color: #333; /* 深色文本 */
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
h1 {
color: #4682b4; /* 天蓝色标题 */
margin-bottom: 20px;
}
form {
background-color: #ffffff;
padding: 20px;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
width: 300px;
text-align: center;
}
label {
font-size: 14px;
color: #4682b4; /* 天蓝色标签 */
display: block;
margin-bottom: 8px;
}
input[type="text"] {
width: 100%;
padding: 8px;
margin: 8px 0;
border: 1px solid #ccc;
border-radius: 4px;
}
input[type="submit"] {
background-color: #4682b4; /* 天蓝色按钮 */
color: white;
padding: 10px;
border: none;
border-radius: 4px;
width: 100%;
cursor: pointer;
}
input[type="submit"]:hover {
background-color: #5a9bd3; /* 按钮悬停时颜色 */
}
a {
display: block;
margin-top: 10px;
color: #4682b4; /* 天蓝色链接 */
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<h1>更新电脑信息</h1>
<form action="/computer?action=edit" method="post">
<input type="hidden" name="id" value="${computer.id}">
<label for="name">名称: </label><br>
<input type="text" id="name" name="name" value="${computer.name}"><br><br>
<label for="price">价格: </label><br>
<input type="text" id="price" name="price" value="${computer.price}"><br><br>
<label for="stock">库存: </label><br>
<input type="text" id="stock" name="stock" value="${computer.stock}"><br><br>
<input type="submit" value="提交修改">
</form>
<br>
<a href="/computer?action=list">返回电脑列表</a>
<div>
<h1>更新电脑信息</h1>
<form action="/computer?action=edit" method="post">
<input type="hidden" name="id" value="${computer.id}">
<label for="name">名称: </label><br>
<input type="text" id="name" name="name" value="${computer.name}"><br><br>
<label for="price">价格: </label><br>
<input type="text" id="price" name="price" value="${computer.price}"><br><br>
<label for="stock">库存: </label><br>
<input type="text" id="stock" name="stock" value="${computer.stock}"><br><br>
<input type="submit" value="提交修改">
</form>
<br>
<a href="/computer?action=list">返回电脑列表</a>
</div>
</body>
</html>