.title { display: inline-block; font-size: 15px; font-weight: bold; position: relative; padding: 5px; &::after { content: ''; height: 2px; background-color: #fe0000; // width: 50px; position: absolute; bottom: 0; left: 0px; right: 0px; } }
<div className={style.title}>推荐产品</div>