项目效果如图:
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
<title>管理中心 - 趣味笔记</title>
<style type="text/css">
body{
margin:0 auto;
background:#fff;
font: normal 16px/150% "微软雅黑",arial,serif; color: #333;
font-family: Arial, sans-serif;
}
.form{width:96%;margin: 0 auto;}
.btn {
padding: 5px;
border: none;
background-color:#3bb4f2;
color: #bcedff;
text-align: center;
width:80px;
border-radius: 0.2rem;
margin: 0.2rem auto;
font-weight: 600;
font-size: 1.2rem
}
.hui { background-color: #eee;color: #888;}
.content{ height:125px;width: 100%}
.content , .title , .text{border:2px solid rgba(0, 0, 0, 0.1);border-radius:5px;;padding:10px 10px;resize: none;}
input[type="text"] {
width:100%;
border-radius: 3px;
border: 1px solid #c8cccf;
background-color:#fff;
color: #6a6f77;
outline: 0;
}
.article
{
margin:0 auto;
}
.article
{
padding: 15px;
font-family:myFirstFont;
}
.article p
{
margin: 30px 0;
/*text-indent: 2em;*/
font-size: 15px;
line-height: 1.7;
}
.article-title{font-size: 22px;color: #333;}
.article-author{float:left;color: #666;}
.article-time{margin-left:5px;color: #999;}
@media only screen and (max-width: 600px){
body{
width:100%; font: normal 13px/180% "微软雅黑",arial,serif; color: #333;}
body {font-family: Arial, sans-serif;}
.btn{ width: 100%}
.article{border:0;}
.article-title{font-size: 16px;}
.article p {margin: 10px 0;}
}
.form-group {
margin-bottom: 15px;
}
control:focus {
outline: none;
box-shadow: none;
border-color: #8dc63f;
}
#top ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color:#4caf50;
position: fixed;
top: 0;
width: 100%;
}
#top li {
float: left;
}
#top li a {
display: block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
#top li a:hover:not(.active) {
background-color: #00bcd4;
}
#top .active {
background-color: #00bcd4;
}
table.hovertable{width:96%;text-align:center}
table.hovertable {
font-family: verdana,arial,sans-serif;
font-size:11px;
color:#333333;
border-width: 1px;
border-color: #999999;
border-collapse: collapse;
}
table.hovertable th {
background-color:#c3dde0;
border-width: 1px;
padding: 8px;
border-style: solid;
border-color: #a9c6c9;
}
table.hovertable tr {
background-color:#d4e3e5;
}
table.hovertable td {
border-width: 1px;
padding: 8px;
border-style: solid;
border-color: #a9c6c9;
}
</style>
<script>
//定义一个询问是否要删除的js代码。
function dodel(id){
if(confirm("确定要删除吗?")){
window.location='del.php?id='+id;
}
}
</script>
</head>
<body>
<div id="top">
<ul>
<li><a href="index.php">添加账号</a></li>
<li><a href="index.php?action=list">查看列表</a> </li>
</ul>
</div>
<center>
<div style="padding-top:30px;margin-top:30px;height:800px;">
<div class="article"><h2 class="Mtop">
<b class="article-title">添加账号</b></h2>
</div>
<div class="form">
<form name="f1" method="post" action="index.php?action=add" class="form-horizontal">
<div class="form-group">
<input type="text" name="username" class="title" placeholder="姓名:">
</div>
<div class="form-group">
<input type="text" name="password" class="title" placeholder="密码:">
</div>
<div class="form-group">
<input type="submit" class="btn" value="提交">
<input type="reset" class="btn hui" value="重置">
</div>
</form>
</div>
</div>
</center>
</body></html>