.underline {
background: linear-gradient(90deg, gray 66%, transparent 0) repeat-x;
background-size: .2em 2px;
background-position: 0 1.4em;
}
<div class="underline">原来你是这样的毛玻璃</div>
效果:
转载于:https://www.cnblogs.com/Zmmy/p/8526780.html
相关资源:Android UI设计系列之自定义TextView属性实现带下划线的文本框(4)