# 新建data_v3/v7/assets/main.css ~~~ /* 成功/错误消息框 */ .box { border: 1px dotted silver; border-radius: 5px; padding: 6px; } .error { background-color: #ff6666; } .success { background-color: #88ff88; } .box ul { margin: 4px; padding-left: 14px; } .box ul li { margin-bottom: 2px; } .install-password { font-size: 1.2em; } .top-menu { border: 1px dotted silver; min-height: 18px; padding: 4px; margin-bottom: 4px; } .menu-options { float: right; } h1, h2, h3 { margin-top: 0; margin-bottom: 8px; } body { font-family: sans-serif; } .post-synopsis { padding-bottom: 8px; border-bottom: 1px dotted silver; margin-bottom: 20px; } .post-synopsis h2, .post h2 { color: darkblue; } .post .date, .post-synopsis .meta { color: white; background-color: grey; border-radius: 7px; padding: 2px; display: inline; font-size: 0.95em; } .comment .comment-meta { font-size: 0.85em; color: grey; border-top: 1px dotted silver; padding-top: 8px; } .comment-body p { margin: 8px 4px; } .comment-list { border-bottom: 1px dotted silver; margin-bottom: 12px; } .comment-margin { margin-bottom: 8px; } .comment-form input, .comment-form textarea { margin: 4px; } .comment-form label { font-size: 0.95em; margin: 6px; width: 7em; color: grey; float: left; text-align: right; /* 一些浏览器将标签设置得过高,从而导致它们不正确地水平堆叠。让我们将其重置为左侧以确保 */ clear: left; } ~~~ # 在templates/创建head.php ~~~ <?php /** * Emai:y7wanghui@gmai.com * Date: 2020/10/31 0031 */ <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <link rel="stylesheet" type="text/css" href="assets/main.cs ~~~ # 在v7/index.php,install.php,login.php,view-post.php 写入 ~~~ <head> ................ <?php require "templates/head.php"?> ................ </head> ~~~