代码:
border-bottom: 4px solid;
border-top: none; // 加不加都一样
border-left: none; // 加不加都一样
border-right: none; // 加不加都一样
<text style="border-image:linear-gradient(to right,{{currentMenu=='menu1'?'red':'#eee'}},#eee) 4 4">商品</text>
开发工具
手机效果
麻烦提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。