index 美化

This commit is contained in:
Yuan Chiu 2020-04-09 23:43:26 +08:00
parent c719ab2d4d
commit 9a84b6a869
3 changed files with 56 additions and 30 deletions

View File

@ -1,18 +1,26 @@
.btn {
display: inline-block;
padding: 0.3em;
padding: 0.3em 1.3em;
text-decoration: none;
font-size: 0.95em;
font-family: none;
border: 1px black solid;
background: blue;
border-radius: 5px;
background: #0e6eff;
color: white;
cursor: pointer;
}
.btn:hover {
opacity: 0.8;
}
ul.func-btn li {
.func-btn li {
display: inline-block;
}
.func-btn form {
display: inline-block;
}
@ -38,7 +46,8 @@ html, body {
}
body {
background: red;
background: #ffd5d5;
background: linear-gradient(153deg, rgba(255,255,255,1) 0%, rgba(255,213,213,1) 100%);
}
div#container {
@ -49,6 +58,7 @@ div#container {
display: block;
background: white;
box-shadow: 1px 1px 20px gray;
}
header h1{

View File

@ -20,6 +20,9 @@ $list = $db->getList($page, $list_max_count);
<link rel="stylesheet" href="css/general.css">
<title>Document</title>
<style>
section, div.func-btn {
margin: 0 auto;
width: 800px;
@ -31,8 +34,14 @@ table {
border-collapse: collapse;
}
table thead th{
border-bottom: 2px gray solid;
padding: 0;
}
table tbody th, table tbody td {
border: 1px black solid;
border-bottom: 1px gray solid;
padding: 0;
}
table>tbody th:nth-child(1) {
@ -41,6 +50,7 @@ table>tbody th:nth-child(1) {
table>tbody td:nth-child(2) {
/* width: 100%; */
text-align: center;
}
table>tbody td:nth-last-child(2) {
width: 9em;
@ -49,9 +59,16 @@ table>tbody td:nth-last-child(1) {
width: 10em;
}
.table-row-func ul {
padding-left: 0em;
}
div.table-func {
text-align: center;
}
</style>
</head>
<body>
@ -67,11 +84,6 @@ div.table-func {
</div>
<section>
<!-- 主表格 -->
<div class="list-info">
<ul>
<li><?php echo $page.'/'.$max_page ?></li>
</ul>
</div>
<?php
if (count($list) > 0) {
echo '
@ -116,6 +128,7 @@ div.table-func {
<ul>
<li><a href="<?php echo $_SERVER['SCRIPT_NAME'].'?p='.'1'; ?>">|&lt;</a></li>
<li><a href="<?php echo $_SERVER['SCRIPT_NAME'].'?p='.(($page-1)>0?($page-1):1); ?>">&lt;</a></li>
<li><?php echo $page.'/'.$max_page ?></li>
<li><a href="<?php echo $_SERVER['SCRIPT_NAME'].'?p='.(($page+1)<$max_page?($page+1):$max_page); ?>">&gt;</a></li>
<li><a href="<?php echo $_SERVER['SCRIPT_NAME'].'?p='.$max_page; ?>">&gt;|</a></li>
</ul>

View File

@ -22,9 +22,11 @@ $created_at = $item['created_at'];
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/general.css">
<title>Document</title>
</head>
<body>
<div id="container">
<header>
<h1>留言板 - <?php echo $id; ?></h1>
</header>
@ -47,5 +49,6 @@ $created_at = $item['created_at'];
</ul>
</section>
</div>
</div>
</body>
</html>