<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<style lang="scss" scoped>
.title-center {
position: relative;
width: 100%;
text-align: center;
height: 100px;
line-height: 100px;
font-size: 28px;
color: #4d72e2;
}
.title-center div {
display: inline-block;
padding: 0 20px;
}
.title-center:before,
.title-center:after {
display: inline-block;
position: relative;
content: "";
height: 2px;
width: 48px;
top: -6px;
background-color: #4d72e2;
}
</style>
</head>
<body>
<div class="title-center">
<div>学生信息</div>
</div>
</body>
</html>
实现结果: