一,实现效果
二,实现代码
<template>
<div class="printItemBox">
<el-card>
<div class="title">顶栏</div>
</el-card>
</div>
</template>
<script>
export default {
}
</script>
<style lang="less" scoped>
.printItemBox{
/deep/.el-card .el-card__body{
padding: 0;
.title{
padding: 8px 0 0 20px;
position: relative;
&::before{
content:'';
width: 4px;
height: 20px;
background: #39475E;
left: 0;
position: absolute;
}
}
}
}
</style>