以下是一个简单的捐赠管理页面的HTML和CSS代码示例:

HTML代码:

<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <title>捐赠管理页面</title>
  <link rel="stylesheet" href="style.css">
</head>

<body>
  <header>
    <h1>捐赠管理</h1>
    <nav>
      <ul>
        <li><a href="#">首页</a></li>
        <li><a href="#">捐赠列表</a></li>
        <li><a href="#">联系我们</a></li>
      </ul>
    </nav>
  </header>
  <main>
    <h2>添加新的捐赠</h2>
    <form>
      <label for="name">捐赠者姓名:</label>
      <input type="text" id="name" name="name" required><br>

      <label for="email">邮箱:</label>
      <input type="email" id="email" name="email" required><br>

      <label for="amount">捐赠金额:</label>
      <input type="number" id="amount" name="amount" required><br>

      <button type="submit">提交</button>
    </form>

    <h2>捐赠列表</h2>
    <table>
      <thead>
        <tr>
          <th>捐赠者姓名</th>
          <th>邮箱</th>
          <th>捐赠金额</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td>张三</td>
          <td>zhangsan@example.com</td>
          <td>100</td>
        </tr>
        <tr>
          <td>李四</td>
          <td>lisi@example.com</td>
          <td>200</td>
        </tr>
        <tr>
          <td>王五</td>
          <td>wangwu@example.com</td>
          <td>50</td>
        </tr>
      </tbody>
    </table>
  </main>
  <footer>
    <p>版权所有 &copy; 2021 捐赠管理系统</p>
  </footer>
</body>

</html>

CSS代码:

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
}

header {
  background-color: #333;
  color: #fff;
  padding: 10px;
}

header h1 {
  margin: 0;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

nav li {
  display: inline-block;
  margin-right: 20px;
}

nav li:last-child {
  margin-right: 0;
}

nav a {
  color: #fff;
  text-decoration: none;
}

main {
  padding: 20px;
}

form label {
  display: inline-block;
  width: 150px;
  font-weight: bold;
}

form input[type="text"],
form input[type="email"],
form input[type="number"] {
  width: 300px;
  padding: 5px;
  margin-bottom: 10px;
}

form button[type="submit"] {
  padding: 5px 10px;
  background-color: #333;
  color: #fff;
  border: none;
  cursor: pointer;
}

table {
  border-collapse: collapse;
  width: 100%;
}

table th,
table td {
  border: 1px solid #ccc;
  padding: 5px;
  text-align: left;
}

table th {
  background-color: #333;
  color: #fff;
}

footer {
  background-color: #eee;
  padding: 10px;
  text-align: center;
}

此代码示例包括一个页面标题,导航菜单,添加新的捐赠表单,捐赠列表和页脚。CSS代码设置了页面的样式,包括颜色,字体,边距和表格样式。可以根据实际需求进行修改和调整

如何用html5+css3写出捐赠管理页面

原文地址: https://www.cveoy.top/t/topic/cd6P 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录