4.django创建配置一个表单页面(留言箱)

用DW编写一个html文件:
在这里插入图片描述

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title></title>
    <link rel="stylesheet" href="/static/css/style.css">
	<style>
		.smart-green {
	margin-left: auto;
	margin-right: auto;
	max-width: 500px;
	padding: 30px 30px 20px 30px;
	font: 12px Arial, Helvetica, sans-serif;
	color: #171717;
	border-radius: 5px;
	-webkit-border-radius: 5px;
	-moz-border-radius: 5px;
	background-color: #C7D8AB;
		}

		.smart-green h1 {
	font: normal 36px Consolas, "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", Monaco, "Courier New", monospace;
	padding: 20px 0px 20px 40px;
	display: block;
	margin: -30px -30px 10px -30px;
	color: #FFF;
	background: #9DC45F;
	border-radius: 5px 5px 0px 0px;
	-webkit-border-radius: 5px 5px 0px 0px;
	-moz-border-radius: 5px 5px 0px 0px;
	border-bottom: 1px none #89AF4C;
	border-right-style: none;
	font-style: normal;
	text-align: center;
		}

		.smart-green h1 > span {
	display: block;
	font-size: 16px;
	color: #FFF;
		}

		.smart-green label {
	display: block;
	margin: 0px 0px 5px;
	background-color: #C7D8AB;
	font-size: 18px;
	font-family: Segoe, "Segoe UI", "DejaVu Sans", "Trebuchet MS", Verdana, sans-serif;
	color: #000000;
	font-style: inherit;
	font-weight: bold;
	clear: right;
	float: none;
		}

		.smart-green label > span {
	float: left;
	margin-top: 10px;
	color: #5E5E5E;
		}

		.smart-green input[type="text"], .smart-green input[type="email"], .smart-green textarea, .smart-green select {
	color: #555;
	height: 30px;
	line-height: 15px;
	width: 100%;
	padding: 0px 0px 0px 10px;
	margin-top: 2px;
	border: 1px solid #E5E5E5;
	outline: 0;
	-webkit-box-shadow: inset 1px 1px 2px rgba(238, 238, 238, 0.2);
	box-shadow: inset 1px 1px 2px rgba(238, 238, 238, 0.2);
	font: normal 14px/14px Arial, Helvetica, sans-serif;
	background-color: #FDE8F8;
		}

		.smart-green textarea {
			height: 100px;
			padding-top: 10px;
		}


		.smart-green .button {
	background-color: #9DC45F;
	border-radius: 5px;
	-webkit-border-radius: 5px;
	-moz-border-border-radius: 5px;
	border: none;
	padding: 10px 25px 10px 25px;
	color: #FFF;
	text-shadow: 1px 1px 1px #949494;
	text-align: right;
		}

		.smart-green .button:hover {
	background-color: #80A24A;
	text-align: right;
	right: auto;
	clip: rect(auto,auto,auto,auto);
		}

		.error-msg{
			color: red;
			margin-top: 10px;
		}
		.success-msg{
			color: #80A24A;
			margin-top: 10px;
			margin-bottom: 10px;
		}
	body,td,th {
	color: #0D0C0C;
}
body {
	background-color: #FFFFFF;
}
    </style>
</head>
<body>
<form action="/form/" method="post" class="smart-green">
    <h1>留言箱
    </h1>
  <label>
      <span>姓名 :</span>
        <input id="name" type="text" name="name" class="error" placeholder="请输入您的姓名"/>
  </label><div class="error-msg"></div>
    

  <label>
      <span>邮箱 :</span>
        <input id="email" type="email" value="" name="email" placeholder="请输入邮箱地址"/>
  </label><div class="error-msg"></div>
    

  <label>
      <span>
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值