实现中间有正文内容的水平线分割线

本文最后更新于:3 个月前

用html语法实现文章前提示中间有正文内容的水平分隔线。

代码实现

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<html>
<style>
.box1{
height:40px;
display:flex;
justify-content:space-between;
align-items:center;
background-color:#00000000;
}
.leftline{
height:2px;
margin-right:10px;
background-color:#257efa99;
flex-grow:1;
}
.rightline{
height:2px;
margin-left:10px;
background-color:#257efa99;
flex-grow:1;
}
.text{
top:0;
font-weight: 700;
color:#257efa;
}
</style>
<div class="box1">
<span class="leftline"></span>
<span class="text">正文部分</span>
<span class="rightline"></span>
</div>
</html>

注:在markdown前添加即可


实现中间有正文内容的水平线分割线
https://superlovelace.top/2022/11/24/Post-style/
作者
棱境
发布于
2022年11月24日
更新于
2023年10月31日
许可协议