文字下面加一条横线,看看

问题遇到的现象和发生背景

img


想在公告标题下面加一条横线,就像左边的那样
一开始,我看一下

img

他的属性,然后我在代码里面

img


加了一个这个,但是并没有成功

  .aa{
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background-color: #dfe4ed;
    z-index: 1;
  }


所以不知道怎么搞了

问题相关代码,请勿粘贴截图
运行结果及报错内容
我的解答思路和尝试过的方法
我想要达到的结果

给.title 添加 border-bottom: 2px solid #ccc;

content: "";伪类:before跟:after的时候才需要加这个

他那个用了伪类 ::after