🎐页面:
博客登录页:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>博客登录页</title>
<link rel="stylesheet" href="common.css">
<link rel="stylesheet" href="login.css">
</head>
<body>
<div class="nav">
<img src="图片/qq.jpg" alt="">
<span>玛卡巴卡</span>
<span class="space"></span>
<span class="sp">主页</span>
<span class="sp">写博客</span>
<span class="sp">注销</span>
</div>
<div class="container-login">
<div class="login">
<div>
<h3>登录</h3>
</div>
<div class="row"><span>用户名</span><input type="text"></div>
<div class="row"><span>密码</span><input type="password"></div>
<div class="row"><button>提交</button></div>
</div>
</div>
</body>
</html>
博客列表页:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>颜哞哞的博客</title>
<link rel="stylesheet" href="common.css">
<link rel="stylesheet" href="list.css">
</head>
<body>
<div class="nav">
<img src="图片/qq.jpg" alt="">
<span>玛卡巴卡</span>
<span class="space"></span>
<span class="sp">主页</span>
<span class="sp">写博客</span>
<span class="sp">注销</span>
</div>
<div class="container">
<div class="left">
<div class="card">
<img src="图片/1.jpg" alt="">
<h3>颜哞哞</h3>
<a href="#">Gitee地址</a>
<div class="row">
<span>文章</span>
<span>分类</span>
</div>
<div class="row">
<span>2</span>
<span>1</span>
</div>
</div>
</div>
<div class="right">
<div class="blog">
<div class="title">
<h3>1.参数解析</h3>
</div>
<div class="date">2023-03-20</div>
<div class="text">考拉有n个字符串字符串,任意两个字符串长度都是不同的。考拉最近学习到有两种字符串的排序方法: 1.根据字符串的字典序排序。例如:“car” < “carriage” <
“cats” < "doggies < “koala”2.根据字符串的长度排序。例如: “car” < “cats” < “koala” < “doggies” < “carriage”考拉想知道自己的这些字符串排列顺序是否满足这两种排序方法,考拉要忙着吃树叶,所以需要你来帮忙验证。</div>
<div class=" detail">查看全文>></div>
</div>
<div class="blog">
<div class="title">
<h3>2.求最小公倍数</h3>
</div>
<div class="date">2023-03-20</div>
<div class="text">正整数A和正整数B 的最小公倍数是指 能被A和B整除的最小的正整数值,设计一个算法,求输入A和B的最小公倍数。数据范围:1≤a,b≤100000 Lorem ipsum
dolor sit, amet consectetur adipisicing elit. Asperiores repellat consequuntur eaque
libero,molestias tempora suscipit soluta? Ut, quisquam maiores aspernatur doloribus nesciunt
voluptatumsint, voluptate, consectetur expedita dignissimos excepturi.</div>
<div class="detail">查看全文>></div>
</div>
</div>
</div>
</body>
</html>
博客详情页:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>博客详情页</title>
<link rel="stylesheet" href="common.css">
<link rel="stylesheet" href="detail.css">
</head>
<body>
<div class="nav">
<img src="图片/qq.jpg" alt="">
<span>玛卡巴卡</span>
<span class="space"></span>
<span class="sp">主页</span>
<span class="sp">写博客</span>
<span class="sp">注销</span>
</div>
<div class="container">
<div class="left">
<div class="card">
<img src="图片/1.jpg" alt="">
<h3>颜哞哞</h3>
<a href="#">Gitee地址</a>
<div class="row">
<span>文章</span>
<span>分类</span>
</div>
<div class="row">
<span>2</span>
<span>1</span>
</div>
</div>
</div>
<div class="right">
<div class="content">
<div class="title">1.参数解析</div>
<div class="date">2023-03-20</div>
<div class="text">
考拉有n个字符串字符串,任意两个字符串长度都是不同的。考拉最近学习到有两种字符串的排序方法: 1.根据字符串的字典序排序。例如:“car” < “carriage” <“cats” < "doggies < “koala”2.根据字符串的长度排序。例如: “car” < “cats” < “koala” < “doggies” < “carriage”考拉想知道自己的这些字符串排列顺序是否满足这两种排序方法,考拉要忙着吃树叶,所以需要你来帮忙验证。
Lorem ipsum dolor sit amet consectetur adipisicing elit. Tenetur eum asperiores velit quam ipsam每经AI快讯,据杭州中院官方微信公众号消息,经最高人民法院核准,2023年3月21日,浙江省杭州市中级人民法院依照法定程序对许国利执行死刑。检察机关依法派员临场监督。
2021年7月26日,杭州市中级人民法院以故意杀人罪判处许国利死刑,剥夺政治权利终身。许国利上诉后,浙江省高级人民法院裁定驳回上诉,维持原判,并报请最高人民法院核准。最高人民法院经复核认为,第一审判决、第二审裁定认定的事实清楚,证据确实、充分,定罪准确,量刑适当,审判程序合法,依法核准对许国利判处死刑的刑事裁定。
杭州市中级人民法院在执行死刑前,安排许国利会见了近亲属,充分保障了被执行罪犯的合法权利。
每日经济新闻 quisquam, recusandae obcaecati qui ipsum animi illo ea libero repellat rem dolorem doloribus consequuntur tempora soluta.
</div>
</div>
</div>
</div>
</body>
</html>
博客编辑页:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>博客编辑页</title>
<link rel="stylesheet" href="common.css">
<link rel="stylesheet" href="edit.css">
<link rel="stylesheet" href="editormd/css/editormd.css" />
</head>
<body>
<div class="nav">
<img src="图片/qq.jpg" alt="">
<span>玛卡巴卡</span>
<span class="space"></span>
<span class="sp">主页</span>
<span class="sp">写博客</span>
<span class="sp">注销</span>
</div>
<div class="content-edit">
<div class="head">
<input type="text" class="title">
<input type="button" class="btn" value="发布文章">
</div>
<!-- markdown 插件 html代码 -->
<div id="test-editor">
<textarea style="display:none;">### 亲爱的傻杯:
你可以开始写博客啦!!!
</textarea>
</div>
</div>
<script src="https://cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
<script src="editormd/editormd.min.js"></script>
<script type="text/javascript">
$(function () {
var editor = editormd("test-editor", {
// width : "100%",
// height : "100%",
path: "editormd/lib/"
});
});
</script>
</body>
</html>
🎐相应的CSS
common.css:
* {
/* 常规设置 */
margin: 0;
padding: 0;
box-sizing: border-box;
}
html,
body {
width: 100%;
height: 100%;
background-image: url(../博客系统小项目/图片/bkg.png);
background-size: cover;
background-position: center center;
}
.nav {
width: 100%;
height: 60px;
background-color: rgba(255, 255, 255, 0.6);
margin-bottom: 3px;
/* 弹性布局 */
display: flex;
justify-content: center;
align-items: center;
}
.nav img {
width: 50px;
height: 50px;
border-radius: 50%;
margin-right: 30px;
}
.nav .space {
/* span标签在弹性布局时可以有宽度 */
width: 65%;
}
.nav .sp {
width: 80px;
}
.container {
width: 100%;
height: calc(100% - 63px);
margin: 0 auto;
/* 显示外框 */
/* border: 1px solid red; */
display: flex;
justify-content: center;
align-items: center;
}
.container .left {
width: 12%;
height: 100%;
/* border: 1px solid red; */
margin-right: 3px;
}
.container .right {
width: 50%;
height: 100%;
border-radius: 10px;
background-color: rgba(255, 255, 255, 0.75);
/* border: 1px solid red; */
/* 垂直方向溢出时产生滚动条 */
overflow-y: auto;
}
.container .left img {
width: 110px;
height: 110px;
border-radius: 50%;
margin: 10px;
}
.container .card {
height: 300px;
border-radius: 10px;
background-color: rgba(255, 255, 255, 0.75);
/* 居中 */
text-align: center;
}
.container a {
color: gray;
/* 去掉下划线 */
text-decoration: none;
}
.container h3 {
margin: 10px;
}
.container span {
width: 150px;
}
.container .row {
margin: 15px;
/* 流式布局 两边走 */
display: flex;
justify-content: space-between;
}
detail.css:
.right .content {
width: 100%;
height: 95%;
}
.content .title {
font-size: 22px;
font-weight: 700;
text-align: center;
margin: 20px;
}
.content .date {
color: green;
text-align: center;
margin-bottom: 20px;
}
.content .text {
margin: 5px;
text-indent: 2em;
}
edit.css:
.content-edit {
width: 70%;
height: calc(100% - 110px);
/* 透明度 */
opacity: 0.9;
margin: 0 auto;
}
.head {
width: 100%;
height: 45px;
margin: 0 auto;
display: flex;
justify-content: space-between;
align-items: center;
}
.title {
width: 89.5%;
height: 35px;
border-radius: 10px;
border: none;
padding-left: 12px;
}
.btn {
width: 10%;
height: 35px;
border-radius: 10px;
background-color: darkorange;
border: none;
}
#test-editor {
width: 100%;
height: calc(100% - 300px);
border-radius: 10px;
}
list.css:
.right .blog {
margin: 20px 5px;
}
.right .title {
text-align: center;
}
.right .date {
color: green;
text-align: center;
margin-bottom: 8px;
}
.right .text {
text-indent: 2em;
}
.right .detail {
width: 100px;
height: 35px;
border: 1px solid black;
text-align: center;
padding: 5px;
/* 上下外边距10px 左右自行计算放最中间 */
margin: 10px auto;
}
login.css:
.container-login {
width: 100%;
height: calc(100% - 63px);
display: flex;
justify-content: center;
align-items: center;
}
.login {
width: 340px;
height: 300px;
background-color: rgba(255, 255, 255, 0.8);
border-radius: 10px;
padding: 25px;
}
.login h3 {
text-align: center;
}
.login .row {
width: 90%;
height: 50px;
margin: 17px auto;
display: flex;
justify-content: space-between;
align-items: center;
}
.login input {
width: 75%;
height: 40px;
border: none;
border-radius: 5px;
padding-left: 8px;
}
.login button {
width: 100%;
height: 100%;
border: none;
border-radius: 5px;
background-color: rgb(51, 218, 51);
}